Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent wrong argument issue #25

Merged
merged 1 commit into from
Aug 7, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading