Skip to content

Commit

Permalink
Merge pull request #270 from Akash-Raj-ST/fix/check-update-fatal-error
Browse files Browse the repository at this point in the history
Fix fatal error in `core check-update` command
  • Loading branch information
thelovekesh authored Oct 1, 2024
2 parents ed4925a + a87fb80 commit e3a580a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/Core_Command.php
Original file line number Diff line number Diff line change
Expand Up @@ -1355,6 +1355,9 @@ private function get_download_url( $version, $locale = 'en_US', $file_type = 'zi

/**
* Returns update information.
*
* @param array $assoc_args Associative array of arguments.
* @return array List of available updates , or an empty array if no updates are available.
*/
private function get_updates( $assoc_args ) {
$force_check = Utils\get_flag_value( $assoc_args, 'force-check' );
Expand Down Expand Up @@ -1405,7 +1408,7 @@ private function get_updates( $assoc_args ) {
if ( true === Utils\get_flag_value( $assoc_args, $type ) ) {
return ! empty( $updates[ $type ] )
? [ $updates[ $type ] ]
: false;
: [];
}
}
return array_values( $updates );
Expand Down

0 comments on commit e3a580a

Please sign in to comment.