From: Dmitry Stogov Date: Mon, 6 Jun 2005 11:20:46 +0000 (+0000) Subject: Fixed bug #32428 (The @ warning error supression operator is broken) X-Git-Tag: php-5.0.1b1~74 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=91a344a5046651ece0a9f91411175a3c31d77c20;p=php Fixed bug #32428 (The @ warning error supression operator is broken) --- diff --git a/NEWS b/NEWS index d7e1a520ca..cbe6f77cce 100644 --- a/NEWS +++ b/NEWS @@ -129,6 +129,8 @@ PHP NEWS (Uwe Schindler) - Fixed bug #32429 (method_exists() always return TRUE if __call method exists). (Dmitry) +- Fixed bug #32428 (The @ warning error supression operator is broken). + (Dmitry) - Fixed bug #32427 (Interfaces are not allowed 'static' access modifier). (Dmitry) - Fixed bug #32109 ($_POST is not populated in multithreaded environment). diff --git a/Zend/tests/bug32428.phpt b/Zend/tests/bug32428.phpt new file mode 100755 index 0000000000..b390c4b686 --- /dev/null +++ b/Zend/tests/bug32428.phpt @@ -0,0 +1,13 @@ +--TEST-- +Bug #32428 (The @ warning error supression operator is broken) +--FILE-- + +--EXPEXT-- +ok diff --git a/Zend/zend_compile.c b/Zend/zend_compile.c index 31cded48c5..cdd56f6c0d 100644 --- a/Zend/zend_compile.c +++ b/Zend/zend_compile.c @@ -336,7 +336,9 @@ void fetch_simple_variable_ex(znode *result, znode *varname, int bp, zend_uchar if (varname->op_type == IS_CONST && varname->u.constant.type == IS_STRING && !zend_is_auto_global(varname->u.constant.value.str.val, varname->u.constant.value.str.len TSRMLS_CC) && !(varname->u.constant.value.str.len == (sizeof("this")-1) && - !memcmp(varname->u.constant.value.str.val, "this", sizeof("this")))) { + !memcmp(varname->u.constant.value.str.val, "this", sizeof("this"))) && + (CG(active_op_array)->last == 0 || + CG(active_op_array)->opcodes[CG(active_op_array)->last-1].opcode != ZEND_BEGIN_SILENCE)) { result->op_type = IS_CV; result->u.var = lookup_cv(CG(active_op_array), varname->u.constant.value.str.val, varname->u.constant.value.str.len); result->u.EA.type = 0;