Skip to content

Commit

Permalink
QA: replace another call to trigger_error() with exit
Browse files Browse the repository at this point in the history
... the call to `trigger_error()` would now throw a PHP notice, but with the `die()` after it, with still kill the program anyhow, so we may as well, exit with the error message and remove the `trigger_error()` function call completely.
  • Loading branch information
jrfnl authored and jtojnar committed Sep 25, 2024
1 parent 7f2fd6c commit 2a05361
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/SimplePie.php
Original file line number Diff line number Diff line change
Expand Up @@ -671,8 +671,7 @@ class SimplePie
public function __construct()
{
if (version_compare(PHP_VERSION, '7.2', '<')) {
trigger_error('Please upgrade to PHP 7.2 or newer.');
die();
exit('Please upgrade to PHP 7.2 or newer.');
}

$this->set_useragent();
Expand Down

0 comments on commit 2a05361

Please sign in to comment.