Skip to content

Commit

Permalink
Fixed Phan issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
zinigor committed Jun 11, 2024
1 parent 575b5fd commit 0684c39
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ private static function extract_zip( string $file, string $destination ) {
$extracted = $zip->extractTo( $destination );
$zip->close();

if ( $extracted !== true ) {
if ( ! $extracted ) {
return new WP_Error( 'zipfile_extract_failure', __( 'The ZIP file could not be extracted.', 'wpcomsh' ) );
}
return true;
Expand Down
2 changes: 1 addition & 1 deletion projects/plugins/wpcomsh/safeguard/utils.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ function uncompress_package( $package ) {
}

$was_uncompressed = $zip_handler->extractTo( $tmp_package_folder );
if ( $was_uncompressed !== true ) {
if ( ! $was_uncompressed ) {
return new WP_Error( 'process_failed', 'The zip file could not be decompressed.' );
}

Expand Down

0 comments on commit 0684c39

Please sign in to comment.