From: cliff at may dot be
Operating system: Linux
PHP version: 5CVS-2003-09-25 (dev)
PHP Bug Type: Zend Engine 2 problem
Bug description: Bug in zend_fetch_constant_handler
Description:
------------
When the wrong value is used for a constant, the error message repeats the
erroneous constant in the warning. I don't totally understand the code
but it appears to be trying to use the erroneous value too. So either
just the second
EX(opline)->op2.u.constant.value.str.val
needs to be changed or the code needs fixing too.
Reproduce code:
---------------
if (!zend_get_constant(EX(opline)->op2.u.constant.value.str.val,
EX(opline)->op2.u.constant.value.str.len,
&EX_T(EX(opline)->result.u.var).tmp_v
ar TSRMLS_CC)) {
zend_error(E_NOTICE, "Use of undefined constant %s - assumed '%s'",
EX(opline)->op2.u.constant.value.str.val,
EX(opline)->op2.u.constant.value.str.val);
EX_T(EX(opline)->result.u.var).tmp_var = EX(opline)->op2.u.constant;
zval_copy_ctor(&EX_T(EX(opline)->result.u.var).tmp_var);
}
Expected result:
----------------
Notice: Use of undefined constant EXTRACT_OVERWRITE - assumed
'EXTR_OVERWRITE' in ...
Actual result:
--------------
Notice: Use of undefined constant EXTRACT_OVERWRITE - assumed
'EXTRACT_OVERWRITE' in ...
--
Edit bug report at http://bugs.php.net/?id=25662&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=25662&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=25662&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=25662&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=25662&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=25662&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=25662&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=25662&r=support
Expected behavior: http://bugs.php.net/fix.php?id=25662&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=25662&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=25662&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=25662&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25662&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=25662&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=25662&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=25662&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=25662&r=float