cvs: php-src /tests/classes interfaces_003.phpt type_hinting_001.phpt type_hinting_003.phpt /tests/lang bug24658.phpt catchable_error_001.phpt
catchable_error_002.phpt type_hints_001.phpt ZendEngine2 zend_execute.c ZendEngine2/tests array_type_hint_001.phpt bug33996.phpt
| From: | Marcus Boerger | Date: | Sun, 21 May 2006 11:23:35 +0000 |
| Subject: | cvs: php-src /tests/classes interfaces_003.phpt type_hinting_001.phpt type_hinting_003.phpt /tests/lang bug24658.phpt catchable_error_001.phpt catchable_error_002.phpt type_hints_001.phpt ZendEngine2 zend_execute.c ZendEngine2/tests array_type_hint_001.phpt bug33996.phpt |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-38329@lists.php.net to get a copy of this message | ||
helly Sun May 21 11:23:35 2006 UTC
Modified files:
/ZendEngine2 zend_execute.c
/ZendEngine2/tests array_type_hint_001.phpt bug33996.phpt
/php-src/tests/classes interfaces_003.phpt type_hinting_001.phpt
type_hinting_003.phpt
/php-src/tests/lang bug24658.phpt catchable_error_001.phpt
catchable_error_002.phpt type_hints_001.phpt
Log:
- Improved error messages
http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_execute.c?r1=1.742&r2=1.743&diff_format=u Index: ZendEngine2/zend_execute.c diff -u ZendEngine2/zend_execute.c:1.742 ZendEngine2/zend_execute.c:1.743 --- ZendEngine2/zend_execute.c:1.742 Mon May 15 15:31:49 2006 +++ ZendEngine2/zend_execute.c Sun May 21 11:23:35 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_execute.c,v 1.742 2006/05/15 15:31:49 dmitry Exp $ */ +/* $Id: zend_execute.c,v 1.743 2006/05/21 11:23:35 helly Exp $ */ #define ZEND_INTENSIVE_DEBUGGING 0 @@ -493,9 +493,9 @@ if (cur_arg_info->class_name.v) { if (!arg) { if (ptr && ptr->op_array) { - zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an object of class %v, called in %s on line %d and defined", arg_num, fclass, fsep, fname, cur_arg_info->class_name, ptr->op_array->filename, ptr->opline->lineno); + zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an object of class %v, none given, called in %s on line %d and defined", arg_num, fclass, fsep, fname, cur_arg_info->class_name, ptr->op_array->filename, ptr->opline->lineno); } else { - zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an object of class %v", arg_num, fclass, fsep, fname, cur_arg_info->class_name); + zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an object of class %v, none given", arg_num, fclass, fsep, fname, cur_arg_info->class_name); } return 0; } @@ -503,9 +503,9 @@ case IS_NULL: if (!cur_arg_info->allow_null) { if (ptr && ptr->op_array) { - zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must not be null, called in %s on line %d and defined", arg_num, fclass, fsep, fname, ptr->op_array->filename, ptr->opline->lineno); + zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an object of class %v, null given, called in %s on line %d and defined", arg_num, fclass, fsep, fname, cur_arg_info->class_name, ptr->op_array->filename, ptr->opline->lineno); } else { - zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must not be null", arg_num, fclass, fsep, fname); + zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an object of class %v, null given", arg_num, fclass, fsep, fname, cur_arg_info->class_name); } return 0; } @@ -520,9 +520,9 @@ error_msg = "be an instance of"; } if (ptr && ptr->op_array) { - zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must %s %v, called in %s on line %d and defined", arg_num, fclass, fsep, fname, error_msg, ce->name, ptr->op_array->filename, ptr->opline->lineno); + zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must %s %v, instance of %v given, called in %s on line %d and defined", arg_num, fclass, fsep, fname, error_msg, ce->name, Z_OBJCE_P(arg)->name, ptr->op_array->filename, ptr->opline->lineno); } else { - zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must %s %v", arg_num, fclass, fsep, fname, error_msg, ce->name); + zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must %s %v, instance of %v given", arg_num, fclass, fsep, fname, error_msg, ce->name, Z_OBJCE_P(arg)->name); } return 0; } @@ -530,18 +530,18 @@ break; default: if (ptr && ptr->op_array) { - zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an object of class %v, called in %s on line %d and defined", arg_num, fclass, fsep, fname, cur_arg_info->class_name, ptr->op_array->filename, ptr->opline->lineno); + zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an object of class %v, %s given, called in %s on line %d and defined", arg_num, fclass, fsep, fname, cur_arg_info->class_name, zend_zval_type_name(arg), ptr->op_array->filename, ptr->opline->lineno); } else { - zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an object of class %v", arg_num, fclass, fsep, fname, cur_arg_info->class_name); + zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an object of class %v, %s given", arg_num, fclass, fsep, fname, cur_arg_info->class_name, zend_zval_type_name(arg)); } return 0; } } else if (cur_arg_info->array_type_hint) { if (!arg) { if (ptr && ptr->op_array) { - zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an array, called in %s on line %d and defined", arg_num, fclass, fsep, fname, ptr->op_array->filename, ptr->opline->lineno); + zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an array, none given, called in %s on line %d and defined", arg_num, fclass, fsep, fname, ptr->op_array->filename, ptr->opline->lineno); } else { - zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an array", arg_num, fclass, fsep, fname); + zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an array, none given", arg_num, fclass, fsep, fname); } return 0; } @@ -549,9 +549,9 @@ case IS_NULL: if (!cur_arg_info->allow_null) { if (ptr && ptr->op_array) { - zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must not be null, called in %s on line %d and defined", arg_num, fclass, fsep, fname, ptr->op_array->filename, ptr->opline->lineno); + zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an array, null given, called in %s on line %d and defined", arg_num, fclass, fsep, fname, ptr->op_array->filename, ptr->opline->lineno); } else { - zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must not be null", arg_num, fclass, fsep, fname); + zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an array, null given", arg_num, fclass, fsep, fname); } return 0; } @@ -560,9 +560,9 @@ break; default: if (ptr && ptr->op_array) { - zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an array, called in %s on line %d and defined", arg_num, fclass, fsep, fname, ptr->op_array->filename, ptr->opline->lineno); + zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an array, %s given, called in %s on line %d and defined", arg_num, fclass, fsep, fname, zend_zval_type_name(arg), ptr->op_array->filename, ptr->opline->lineno); } else { - zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an array", arg_num, fclass, fsep, fname); + zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an array, %s given", arg_num, fclass, fsep, fname, zend_zval_type_name(arg)); } return 0; } http://cvs.php.net/viewcvs.cgi/ZendEngine2/tests/array_type_hint_001.phpt?r1=1.4&r2=1.5&diff_format=u Index: ZendEngine2/tests/array_type_hint_001.phpt diff -u ZendEngine2/tests/array_type_hint_001.phpt:1.4 ZendEngine2/tests/array_type_hint_001.phpt:1.5 --- ZendEngine2/tests/array_type_hint_001.phpt:1.4 Fri Sep 16 15:24:50 2005 +++ ZendEngine2/tests/array_type_hint_001.phpt Sun May 21 11:23:35 2006 @@ -12,4 +12,4 @@ --EXPECTF-- 3 -Catchable fatal error: Argument 1 passed to foo() must be an array, called in %sarray_type_hint_001.php on line 7 and defined in %sarray_type_hint_001.php on line 2 +Catchable fatal error: Argument 1 passed to foo() must be an array, integer given, called in %sarray_type_hint_001.php on line 7 and defined in %sarray_type_hint_001.php on line 2 http://cvs.php.net/viewcvs.cgi/ZendEngine2/tests/bug33996.phpt?r1=1.3&r2=1.4&diff_format=u Index: ZendEngine2/tests/bug33996.phpt diff -u ZendEngine2/tests/bug33996.phpt:1.3 ZendEngine2/tests/bug33996.phpt:1.4 --- ZendEngine2/tests/bug33996.phpt:1.3 Mon Sep 19 07:23:47 2005 +++ ZendEngine2/tests/bug33996.phpt Sun May 21 11:23:35 2006 @@ -24,7 +24,6 @@ FooTest(new Foo()); ?> --EXPECTF-- -Warning: Missing argument 1 for NormalTest(), called in %sbug33996.php on line 17 and defined in %sbug33996.php on line 12 +Warning: Missing argument 1 for NormalTest(), called in %sbug33996.php on line %d and defined in %sbug33996.php on line %d Hi! -Catchable fatal error: Argument 1 passed to FooTest() must be an object of class Foo, called in %sbug33996.php on line 18 and defined in %sbug33996.php on line 7 - +Catchable fatal error: Argument 1 passed to FooTest() must be an object of class Foo, none given, called in %sbug33996.php on line %d and defined in %sbug33996.php on line %d http://cvs.php.net/viewcvs.cgi/php-src/tests/classes/interfaces_003.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/tests/classes/interfaces_003.phpt diff -u php-src/tests/classes/interfaces_003.phpt:1.2 php-src/tests/classes/interfaces_003.phpt:1.3 --- php-src/tests/classes/interfaces_003.phpt:1.2 Wed May 10 21:12:31 2006 +++ php-src/tests/classes/interfaces_003.phpt Sun May 21 11:23:35 2006 @@ -23,4 +23,4 @@ ===DONE=== --EXPECTF-- -Catchable fatal error: Argument 1 passed to MyTestClass::__construct() must be an object of class MyObject, called in %sinterfaces_003.php on line %d +Catchable fatal error: Argument 1 passed to MyTestClass::__construct() must be an object of class MyObject, none given, called in %sinterfaces_003.php on line %d http://cvs.php.net/viewcvs.cgi/php-src/tests/classes/type_hinting_001.phpt?r1=1.5&r2=1.6&diff_format=u Index: php-src/tests/classes/type_hinting_001.phpt diff -u php-src/tests/classes/type_hinting_001.phpt:1.5 php-src/tests/classes/type_hinting_001.phpt:1.6 --- php-src/tests/classes/type_hinting_001.phpt:1.5 Fri Sep 16 15:24:50 2005 +++ php-src/tests/classes/type_hinting_001.phpt Sun May 21 11:23:35 2006 @@ -35,4 +35,4 @@ ?> --EXPECTF-- -Catchable fatal error: Argument 1 passed to FooBar::a() must implement interface Foo, called in %s on line 27 and defined in %s on line 12 +Catchable fatal error: Argument 1 passed to FooBar::a() must implement interface Foo, instance of Blort given, called in %s on line 27 and defined in %s on line 12 http://cvs.php.net/viewcvs.cgi/php-src/tests/classes/type_hinting_003.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/tests/classes/type_hinting_003.phpt diff -u php-src/tests/classes/type_hinting_003.phpt:1.1 php-src/tests/classes/type_hinting_003.phpt:1.2 --- php-src/tests/classes/type_hinting_003.phpt:1.1 Tue Nov 15 21:32:54 2005 +++ php-src/tests/classes/type_hinting_003.phpt Sun May 21 11:23:35 2006 @@ -57,4 +57,4 @@ int(25) } -Catchable fatal error: Argument 1 passed to Test::f1() must be an array, called in %stype_hinting_003.php on line %d and defined in %stype_hinting_003.php on line %d +Catchable fatal error: Argument 1 passed to Test::f1() must be an array, integer given, called in %stype_hinting_003.php on line %d and defined in %stype_hinting_003.php on line %d http://cvs.php.net/viewcvs.cgi/php-src/tests/lang/bug24658.phpt?r1=1.5&r2=1.6&diff_format=u Index: php-src/tests/lang/bug24658.phpt diff -u php-src/tests/lang/bug24658.phpt:1.5 php-src/tests/lang/bug24658.phpt:1.6 --- php-src/tests/lang/bug24658.phpt:1.5 Fri Sep 16 15:24:50 2005 +++ php-src/tests/lang/bug24658.phpt Sun May 21 11:23:35 2006 @@ -53,4 +53,4 @@ object(foo)#%d (0) { } -Catchable fatal error: Argument 1 passed to typehint() must be an object of class foo in %s on line %d +Catchable fatal error: Argument 1 passed to typehint() must be an object of class foo, integer given in %s on line %d http://cvs.php.net/viewcvs.cgi/php-src/tests/lang/catchable_error_001.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/tests/lang/catchable_error_001.phpt diff -u php-src/tests/lang/catchable_error_001.phpt:1.2 php-src/tests/lang/catchable_error_001.phpt:1.3 --- php-src/tests/lang/catchable_error_001.phpt:1.2 Fri Sep 16 15:24:50 2005 +++ php-src/tests/lang/catchable_error_001.phpt Sun May 21 11:23:35 2006 @@ -19,4 +19,4 @@ echo "ALIVE!\n"; ?> --EXPECTF-- -Catchable fatal error: Argument 1 passed to blah() must be an instance of Foo, called in %scatchable_error_001.php on line 15 and defined in %scatchable_error_001.php on line 5 +Catchable fatal error: Argument 1 passed to blah() must be an instance of Foo, instance of stdClass given, called in %scatchable_error_001.php on line 15 and defined in %scatchable_error_001.php on line 5 http://cvs.php.net/viewcvs.cgi/php-src/tests/lang/catchable_error_002.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/tests/lang/catchable_error_002.phpt diff -u php-src/tests/lang/catchable_error_002.phpt:1.3 php-src/tests/lang/catchable_error_002.phpt:1.4 --- php-src/tests/lang/catchable_error_002.phpt:1.3 Tue Jan 17 12:18:53 2006 +++ php-src/tests/lang/catchable_error_002.phpt Sun May 21 11:23:35 2006 @@ -25,7 +25,7 @@ [0]=> int(4096) [1]=> - string(%d) "Argument 1 passed to blah() must be an instance of Foo, called in %scatchable_error_002.php on line 17 and defined" + string(%d) "Argument 1 passed to blah() must be an instance of Foo, instance of stdClass given, called in %scatchable_error_002.php on line 17 and defined" [2]=> string(%d) "%scatchable_error_002.php" [3]=> http://cvs.php.net/viewcvs.cgi/php-src/tests/lang/type_hints_001.phpt?r1=1.5&r2=1.6&diff_format=u Index: php-src/tests/lang/type_hints_001.phpt diff -u php-src/tests/lang/type_hints_001.phpt:1.5 php-src/tests/lang/type_hints_001.phpt:1.6 --- php-src/tests/lang/type_hints_001.phpt:1.5 Fri Sep 16 15:24:50 2005 +++ php-src/tests/lang/type_hints_001.phpt Sun May 21 11:23:35 2006 @@ -23,4 +23,4 @@ ?> --EXPECTF-- -Catchable fatal error: Argument 1 passed to type_hint_foo() must be an instance of Foo, called in %s on line 16 and defined in %s on line 9 +Catchable fatal error: Argument 1 passed to type_hint_foo() must be an instance of Foo, instance of Bar given, called in %s on line 16 and defined in %s on line 9
http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_execute.c?r1=1.742&r2=1.743&diff_format=u Index: ZendEngine2/zend_execute.c diff -u ZendEngine2/zend_execute.c:1.742 ZendEngine2/zend_execute.c:1.743 --- ZendEngine2/zend_execute.c:1.742 Mon May 15 15:31:49 2006 +++ ZendEngine2/zend_execute.c Sun May 21 11:23:35 2006 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_execute.c,v 1.742 2006/05/15 15:31:49 dmitry Exp $ */ +/* $Id: zend_execute.c,v 1.743 2006/05/21 11:23:35 helly Exp $ */ #define ZEND_INTENSIVE_DEBUGGING 0 @@ -493,9 +493,9 @@ if (cur_arg_info->class_name.v) { if (!arg) { if (ptr && ptr->op_array) { - zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an object of class %v, called in %s on line %d and defined", arg_num, fclass, fsep, fname, cur_arg_info->class_name, ptr->op_array->filename, ptr->opline->lineno); + zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an object of class %v, none given, called in %s on line %d and defined", arg_num, fclass, fsep, fname, cur_arg_info->class_name, ptr->op_array->filename, ptr->opline->lineno); } else { - zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an object of class %v", arg_num, fclass, fsep, fname, cur_arg_info->class_name); + zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an object of class %v, none given", arg_num, fclass, fsep, fname, cur_arg_info->class_name); } return 0; } @@ -503,9 +503,9 @@ case IS_NULL: if (!cur_arg_info->allow_null) { if (ptr && ptr->op_array) { - zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must not be null, called in %s on line %d and defined", arg_num, fclass, fsep, fname, ptr->op_array->filename, ptr->opline->lineno); + zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an object of class %v, null given, called in %s on line %d and defined", arg_num, fclass, fsep, fname, cur_arg_info->class_name, ptr->op_array->filename, ptr->opline->lineno); } else { - zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must not be null", arg_num, fclass, fsep, fname); + zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an object of class %v, null given", arg_num, fclass, fsep, fname, cur_arg_info->class_name); } return 0; } @@ -520,9 +520,9 @@ error_msg = "be an instance of"; } if (ptr && ptr->op_array) { - zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must %s %v, called in %s on line %d and defined", arg_num, fclass, fsep, fname, error_msg, ce->name, ptr->op_array->filename, ptr->opline->lineno); + zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must %s %v, instance of %v given, called in %s on line %d and defined", arg_num, fclass, fsep, fname, error_msg, ce->name, Z_OBJCE_P(arg)->name, ptr->op_array->filename, ptr->opline->lineno); } else { - zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must %s %v", arg_num, fclass, fsep, fname, error_msg, ce->name); + zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must %s %v, instance of %v given", arg_num, fclass, fsep, fname, error_msg, ce->name, Z_OBJCE_P(arg)->name); } return 0; } @@ -530,18 +530,18 @@ break; default: if (ptr && ptr->op_array) { - zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an object of class %v, called in %s on line %d and defined", arg_num, fclass, fsep, fname, cur_arg_info->class_name, ptr->op_array->filename, ptr->opline->lineno); + zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an object of class %v, %s given, called in %s on line %d and defined", arg_num, fclass, fsep, fname, cur_arg_info->class_name, zend_zval_type_name(arg), ptr->op_array->filename, ptr->opline->lineno); } else { - zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an object of class %v", arg_num, fclass, fsep, fname, cur_arg_info->class_name); + zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an object of class %v, %s given", arg_num, fclass, fsep, fname, cur_arg_info->class_name, zend_zval_type_name(arg)); } return 0; } } else if (cur_arg_info->array_type_hint) { if (!arg) { if (ptr && ptr->op_array) { - zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an array, called in %s on line %d and defined", arg_num, fclass, fsep, fname, ptr->op_array->filename, ptr->opline->lineno); + zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an array, none given, called in %s on line %d and defined", arg_num, fclass, fsep, fname, ptr->op_array->filename, ptr->opline->lineno); } else { - zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an array", arg_num, fclass, fsep, fname); + zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an array, none given", arg_num, fclass, fsep, fname); } return 0; } @@ -549,9 +549,9 @@ case IS_NULL: if (!cur_arg_info->allow_null) { if (ptr && ptr->op_array) { - zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must not be null, called in %s on line %d and defined", arg_num, fclass, fsep, fname, ptr->op_array->filename, ptr->opline->lineno); + zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an array, null given, called in %s on line %d and defined", arg_num, fclass, fsep, fname, ptr->op_array->filename, ptr->opline->lineno); } else { - zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must not be null", arg_num, fclass, fsep, fname); + zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an array, null given", arg_num, fclass, fsep, fname); } return 0; } @@ -560,9 +560,9 @@ break; default: if (ptr && ptr->op_array) { - zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an array, called in %s on line %d and defined", arg_num, fclass, fsep, fname, ptr->op_array->filename, ptr->opline->lineno); + zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an array, %s given, called in %s on line %d and defined", arg_num, fclass, fsep, fname, zend_zval_type_name(arg), ptr->op_array->filename, ptr->opline->lineno); } else { - zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an array", arg_num, fclass, fsep, fname); + zend_error(E_RECOVERABLE_ERROR, "Argument %d passed to %v%s%v() must be an array, %s given", arg_num, fclass, fsep, fname, zend_zval_type_name(arg)); } return 0; } http://cvs.php.net/viewcvs.cgi/ZendEngine2/tests/array_type_hint_001.phpt?r1=1.4&r2=1.5&diff_format=u Index: ZendEngine2/tests/array_type_hint_001.phpt diff -u ZendEngine2/tests/array_type_hint_001.phpt:1.4 ZendEngine2/tests/array_type_hint_001.phpt:1.5 --- ZendEngine2/tests/array_type_hint_001.phpt:1.4 Fri Sep 16 15:24:50 2005 +++ ZendEngine2/tests/array_type_hint_001.phpt Sun May 21 11:23:35 2006 @@ -12,4 +12,4 @@ --EXPECTF-- 3 -Catchable fatal error: Argument 1 passed to foo() must be an array, called in %sarray_type_hint_001.php on line 7 and defined in %sarray_type_hint_001.php on line 2 +Catchable fatal error: Argument 1 passed to foo() must be an array, integer given, called in %sarray_type_hint_001.php on line 7 and defined in %sarray_type_hint_001.php on line 2 http://cvs.php.net/viewcvs.cgi/ZendEngine2/tests/bug33996.phpt?r1=1.3&r2=1.4&diff_format=u Index: ZendEngine2/tests/bug33996.phpt diff -u ZendEngine2/tests/bug33996.phpt:1.3 ZendEngine2/tests/bug33996.phpt:1.4 --- ZendEngine2/tests/bug33996.phpt:1.3 Mon Sep 19 07:23:47 2005 +++ ZendEngine2/tests/bug33996.phpt Sun May 21 11:23:35 2006 @@ -24,7 +24,6 @@ FooTest(new Foo()); ?> --EXPECTF-- -Warning: Missing argument 1 for NormalTest(), called in %sbug33996.php on line 17 and defined in %sbug33996.php on line 12 +Warning: Missing argument 1 for NormalTest(), called in %sbug33996.php on line %d and defined in %sbug33996.php on line %d Hi! -Catchable fatal error: Argument 1 passed to FooTest() must be an object of class Foo, called in %sbug33996.php on line 18 and defined in %sbug33996.php on line 7 - +Catchable fatal error: Argument 1 passed to FooTest() must be an object of class Foo, none given, called in %sbug33996.php on line %d and defined in %sbug33996.php on line %d http://cvs.php.net/viewcvs.cgi/php-src/tests/classes/interfaces_003.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/tests/classes/interfaces_003.phpt diff -u php-src/tests/classes/interfaces_003.phpt:1.2 php-src/tests/classes/interfaces_003.phpt:1.3 --- php-src/tests/classes/interfaces_003.phpt:1.2 Wed May 10 21:12:31 2006 +++ php-src/tests/classes/interfaces_003.phpt Sun May 21 11:23:35 2006 @@ -23,4 +23,4 @@ ===DONE=== --EXPECTF-- -Catchable fatal error: Argument 1 passed to MyTestClass::__construct() must be an object of class MyObject, called in %sinterfaces_003.php on line %d +Catchable fatal error: Argument 1 passed to MyTestClass::__construct() must be an object of class MyObject, none given, called in %sinterfaces_003.php on line %d http://cvs.php.net/viewcvs.cgi/php-src/tests/classes/type_hinting_001.phpt?r1=1.5&r2=1.6&diff_format=u Index: php-src/tests/classes/type_hinting_001.phpt diff -u php-src/tests/classes/type_hinting_001.phpt:1.5 php-src/tests/classes/type_hinting_001.phpt:1.6 --- php-src/tests/classes/type_hinting_001.phpt:1.5 Fri Sep 16 15:24:50 2005 +++ php-src/tests/classes/type_hinting_001.phpt Sun May 21 11:23:35 2006 @@ -35,4 +35,4 @@ ?> --EXPECTF-- -Catchable fatal error: Argument 1 passed to FooBar::a() must implement interface Foo, called in %s on line 27 and defined in %s on line 12 +Catchable fatal error: Argument 1 passed to FooBar::a() must implement interface Foo, instance of Blort given, called in %s on line 27 and defined in %s on line 12 http://cvs.php.net/viewcvs.cgi/php-src/tests/classes/type_hinting_003.phpt?r1=1.1&r2=1.2&diff_format=u Index: php-src/tests/classes/type_hinting_003.phpt diff -u php-src/tests/classes/type_hinting_003.phpt:1.1 php-src/tests/classes/type_hinting_003.phpt:1.2 --- php-src/tests/classes/type_hinting_003.phpt:1.1 Tue Nov 15 21:32:54 2005 +++ php-src/tests/classes/type_hinting_003.phpt Sun May 21 11:23:35 2006 @@ -57,4 +57,4 @@ int(25) } -Catchable fatal error: Argument 1 passed to Test::f1() must be an array, called in %stype_hinting_003.php on line %d and defined in %stype_hinting_003.php on line %d +Catchable fatal error: Argument 1 passed to Test::f1() must be an array, integer given, called in %stype_hinting_003.php on line %d and defined in %stype_hinting_003.php on line %d http://cvs.php.net/viewcvs.cgi/php-src/tests/lang/bug24658.phpt?r1=1.5&r2=1.6&diff_format=u Index: php-src/tests/lang/bug24658.phpt diff -u php-src/tests/lang/bug24658.phpt:1.5 php-src/tests/lang/bug24658.phpt:1.6 --- php-src/tests/lang/bug24658.phpt:1.5 Fri Sep 16 15:24:50 2005 +++ php-src/tests/lang/bug24658.phpt Sun May 21 11:23:35 2006 @@ -53,4 +53,4 @@ object(foo)#%d (0) { } -Catchable fatal error: Argument 1 passed to typehint() must be an object of class foo in %s on line %d +Catchable fatal error: Argument 1 passed to typehint() must be an object of class foo, integer given in %s on line %d http://cvs.php.net/viewcvs.cgi/php-src/tests/lang/catchable_error_001.phpt?r1=1.2&r2=1.3&diff_format=u Index: php-src/tests/lang/catchable_error_001.phpt diff -u php-src/tests/lang/catchable_error_001.phpt:1.2 php-src/tests/lang/catchable_error_001.phpt:1.3 --- php-src/tests/lang/catchable_error_001.phpt:1.2 Fri Sep 16 15:24:50 2005 +++ php-src/tests/lang/catchable_error_001.phpt Sun May 21 11:23:35 2006 @@ -19,4 +19,4 @@ echo "ALIVE!\n"; ?> --EXPECTF-- -Catchable fatal error: Argument 1 passed to blah() must be an instance of Foo, called in %scatchable_error_001.php on line 15 and defined in %scatchable_error_001.php on line 5 +Catchable fatal error: Argument 1 passed to blah() must be an instance of Foo, instance of stdClass given, called in %scatchable_error_001.php on line 15 and defined in %scatchable_error_001.php on line 5 http://cvs.php.net/viewcvs.cgi/php-src/tests/lang/catchable_error_002.phpt?r1=1.3&r2=1.4&diff_format=u Index: php-src/tests/lang/catchable_error_002.phpt diff -u php-src/tests/lang/catchable_error_002.phpt:1.3 php-src/tests/lang/catchable_error_002.phpt:1.4 --- php-src/tests/lang/catchable_error_002.phpt:1.3 Tue Jan 17 12:18:53 2006 +++ php-src/tests/lang/catchable_error_002.phpt Sun May 21 11:23:35 2006 @@ -25,7 +25,7 @@ [0]=> int(4096) [1]=> - string(%d) "Argument 1 passed to blah() must be an instance of Foo, called in %scatchable_error_002.php on line 17 and defined" + string(%d) "Argument 1 passed to blah() must be an instance of Foo, instance of stdClass given, called in %scatchable_error_002.php on line 17 and defined" [2]=> string(%d) "%scatchable_error_002.php" [3]=> http://cvs.php.net/viewcvs.cgi/php-src/tests/lang/type_hints_001.phpt?r1=1.5&r2=1.6&diff_format=u Index: php-src/tests/lang/type_hints_001.phpt diff -u php-src/tests/lang/type_hints_001.phpt:1.5 php-src/tests/lang/type_hints_001.phpt:1.6 --- php-src/tests/lang/type_hints_001.phpt:1.5 Fri Sep 16 15:24:50 2005 +++ php-src/tests/lang/type_hints_001.phpt Sun May 21 11:23:35 2006 @@ -23,4 +23,4 @@ ?> --EXPECTF-- -Catchable fatal error: Argument 1 passed to type_hint_foo() must be an instance of Foo, called in %s on line 16 and defined in %s on line 9 +Catchable fatal error: Argument 1 passed to type_hint_foo() must be an instance of Foo, instance of Bar given, called in %s on line 16 and defined in %s on line 9