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

[zend-paginator] prevent fatal error on php8 #109

Merged
merged 1 commit into from
Oct 1, 2021
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
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,11 @@ public function __destruct()
*/
public function setOutputStream($resource)
{
$stream = @fopen($resource, 'w');
// catch and ignore ValueError which PHP 8.0+ may throw on invalid values passed to internal function
$stream = false;
try {
$stream = @fopen($resource, 'w');
} catch (ValueError $e) {}

if ($stream === false) {
// require_once 'Zend/ProgressBar/Adapter/Exception.php';
Expand Down