cvs: Zend(PHP_4_4) / zend_execute.c

From: Date: Thu, 19 Oct 2006 11:24:09 +0000
Subject: cvs: Zend(PHP_4_4) / zend_execute.c
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-5339@lists.php.net to get a copy of this message
bjori Thu Oct 19 11:24:09 2006 UTC Modified files: (Branch: PHP_4_4) /Zend zend_execute.c Log: Fixed bug#38722 (Calling undefined method prints insufficient error message) http://cvs.php.net/viewvc.cgi/Zend/zend_execute.c?r1=1.316.2.49.2.16&r2=1.316.2.49.2.17&diff_format=u Index: Zend/zend_execute.c diff -u Zend/zend_execute.c:1.316.2.49.2.16 Zend/zend_execute.c:1.316.2.49.2.17 --- Zend/zend_execute.c:1.316.2.49.2.16 Fri Aug 11 13:04:14 2006 +++ Zend/zend_execute.c Thu Oct 19 11:24:09 2006 @@ -1632,7 +1632,13 @@ active_function_table = EG(function_table); } if (zend_hash_find(active_function_table, function_name->value.str.val, function_name->value.str.len+1, (void **) &function)==FAILURE) { - zend_error(E_ERROR, "Call to undefined function: %s()", function_name->value.str.val); + if (EX(object).ptr && EX(object).ptr->type == IS_OBJECT) { + zend_error(E_ERROR, "Call to undefined method: %s->%s()", Z_OBJCE_P(EX(object).ptr)->name, function_name->value.str.val); + } else if (EX(opline)->op1.op_type == IS_CONST) { + zend_error(E_ERROR, "Call to undefined static function: %s::%s()", EX(opline)->op1.u.constant.value.str.val, function_name->value.str.val); + } else { + zend_error(E_ERROR, "Call to undefined function: %s()", function_name->value.str.val); + } } zval_dtor(&tmp); EX(fbc) = function;

« previous php.zend-engine.cvs (#5339) next »