Skip to content

Commit d0e043b

Browse files
committed
Avoid repeatable work when error_reporting() is called with the same argument few times.
1 parent 65859fe commit d0e043b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Zend/zend_builtin_functions.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ ZEND_FUNCTION(error_reporting)
377377

378378
old_error_reporting = EG(error_reporting);
379379

380-
if (!err_is_null) {
380+
if (!err_is_null && err != old_error_reporting) {
381381
zend_string *new_val = zend_long_to_str(err);
382382
if (UNEXPECTED(!new_val)) {
383383
RETURN_THROWS();

0 commit comments

Comments
 (0)