Index: Zend/zend_constants.c =================================================================== RCS file: /repository/ZendEngine2/zend_constants.c,v retrieving revision 1.71.2.5.2.5 diff -u -p -d -r1.71.2.5.2.5 zend_constants.c --- Zend/zend_constants.c 4 Apr 2007 00:42:42 -0000 1.71.2.5.2.5 +++ Zend/zend_constants.c 1 Jun 2007 12:05:46 -0000 @@ -259,15 +259,16 @@ ZEND_API int zend_get_constant_ex(char * retval = 0; } } - efree(class_name); if (retval && ce) { if (zend_hash_find(&((*ce)->constants_table), constant_name, const_name_len+1, (void **) &ret_constant) != SUCCESS) { retval = 0; } } else { + zend_error(E_ERROR, "Class '%s' not found", class_name); retval = 0; } + efree(class_name); if (retval) { zval_update_constant(ret_constant, (void*)1 TSRMLS_CC);