1
0
mirror of https://github.com/php/php-src.git synced 2026-04-14 11:32:11 +02:00

Avoid repeatable work when error_reporting() is called with the same argument few times.

This commit is contained in:
Dmitry Stogov
2021-03-11 14:27:53 +03:00
parent 65859fe17e
commit d0e043b294

View File

@@ -377,7 +377,7 @@ ZEND_FUNCTION(error_reporting)
old_error_reporting = EG(error_reporting);
if (!err_is_null) {
if (!err_is_null && err != old_error_reporting) {
zend_string *new_val = zend_long_to_str(err);
if (UNEXPECTED(!new_val)) {
RETURN_THROWS();