Skip to content

Commit

Permalink
ZIP: Don't read/write ZIP archive from/into identical file
Browse files Browse the repository at this point in the history
  • Loading branch information
mjansenDatabay authored and chfsx committed Feb 14, 2025
1 parent 1fc6b51 commit 9093341
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public function zip(
$zip->addDirectory($directory_to_zip);
$zip_stream = $zip->get();

return file_put_contents($path_to_output_zip, $zip_stream->getContents()) > 0;
return $zip_stream->getSize() > 0;
}

/**
Expand Down

0 comments on commit 9093341

Please sign in to comment.