Skip to content

Commit

Permalink
Merge pull request #25 from stellarwp/bugfix/21/wrong-argument
Browse files Browse the repository at this point in the history
Prevent wrong argument issue
  • Loading branch information
jamesckemp authored Aug 7, 2023
2 parents 1b37f82 + 5c057d7 commit 6925d72
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Uplink/Admin/Package_Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ class Package_Handler {
/**
* Filters the package download step to store the downloaded file with a shorter file name.
*
* @param bool $reply Whether to bail without returning the package.
* Default false.
* @param string $package The package file name or URL.
* @param WP_Upgrader $upgrader The WP_Upgrader instance.
* @param array $hook_extra Extra arguments passed to hooked filters.
* @param bool|\WP_Error $reply Whether to bail without returning the package.
* Default false.
* @param string $package The package file name or URL.
* @param WP_Upgrader $upgrader The WP_Upgrader instance.
* @param array $hook_extra Extra arguments passed to hooked filters.
*
* @return mixed
*/
public function filter_upgrader_pre_download( bool $reply, string $package, WP_Upgrader $upgrader, $hook_extra ) {
public function filter_upgrader_pre_download( $reply, string $package, WP_Upgrader $upgrader, $hook_extra ) {
if ( empty( $package ) || 'invalid_license' === $package ) {
return new \WP_Error(
'download_failed',
Expand Down

0 comments on commit 6925d72

Please sign in to comment.