From: Dmitry Stogov Date: Mon, 4 Sep 2017 09:58:40 +0000 (+0300) Subject: Prevent duplicate debug output X-Git-Tag: php-7.2.0RC2~57 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4f1c2c22cace54373824a0244e41bfb7d8c6c2f9;p=php Prevent duplicate debug output --- diff --git a/ext/opcache/Optimizer/zend_optimizer.c b/ext/opcache/Optimizer/zend_optimizer.c index 89917224d9..9cf509f4d1 100644 --- a/ext/opcache/Optimizer/zend_optimizer.c +++ b/ext/opcache/Optimizer/zend_optimizer.c @@ -1367,7 +1367,8 @@ int zend_optimize_script(zend_script *script, zend_long optimization_level, zend } ZEND_HASH_FOREACH_END(); } - if (debug_level & ZEND_DUMP_AFTER_OPTIMIZER) { + if ((debug_level & ZEND_DUMP_AFTER_OPTIMIZER) && + (ZEND_OPTIMIZER_PASS_7 & ctx->optimization_level) { zend_dump_op_array(&script->main_op_array, ZEND_DUMP_RT_CONSTANTS, "after optimizer", NULL); ZEND_HASH_FOREACH_PTR(&script->function_table, op_array) {