ID: 25662 User updated by: cliff at may dot be Reported By: cliff at may dot be Status: Bogus Bug Type: Zend Engine 2 problem Operating System: Linux PHP Version: 5CVS-2003-09-25 (dev) New Comment:
To what effect? A string is not a legal value there. IMHO, it should either use the default value or generate a fatal error. Or am I missing something obvious? Previous Comments: ------------------------------------------------------------------------ [2003-09-25 16:45:41] [EMAIL PROTECTED] It assumes you meant (string)'EXTRACT_OVERWRITE' and uses that instead of the constant's value. ------------------------------------------------------------------------ [2003-09-25 15:54:48] cliff at may dot be 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 this bug report at http://bugs.php.net/?id=25662&edit=1