]> granicus.if.org Git - php/commitdiff
Added missing warning message
authorDmitry Stogov <dmitry@php.net>
Thu, 10 Jan 2008 09:38:41 +0000 (09:38 +0000)
committerDmitry Stogov <dmitry@php.net>
Thu, 10 Jan 2008 09:38:41 +0000 (09:38 +0000)
Zend/zend_execute_API.c
ext/reflection/tests/bug42976.phpt
ext/standard/tests/general_functions/bug41970.phpt

index ff404df7e7827693e39679dfde3062196e1893fe..7c764bed90790a66cb77f487e0fe20dff17269bd 100644 (file)
@@ -1058,6 +1058,11 @@ int zend_call_function(zend_fcall_info *fci, zend_fcall_info_cache *fci_cache TS
                                                zval_ptr_dtor(&method_name);
                                                zval_ptr_dtor(&params_array);
                                        }
+                                       zend_error(E_WARNING, "Parameter %d to %v%s%v() expected to be a reference, value given",
+                                               i+1,
+                                               EX(function_state).function->common.scope ? EX(function_state).function->common.scope->name : EMPTY_ZSTR,
+                                               EX(function_state).function->common.scope ? "::" : "",
+                                               EX(function_state).function->common.function_name);
                                        return FAILURE;
                                }
                                ALLOC_ZVAL(new_zval);
index 38aed3a400f34ad7602507e13465619c7a271927..9576f4f5d2a6dfdf40ddac55d572cc82ecda43ec 100644 (file)
@@ -26,9 +26,26 @@ echo "Done\n";
 --EXPECTF--    
 string(9) "x.changed"
 
-Warning: Invocation of C's constructor failed in %s/bug42976.php on line %d
+Warning: Parameter 1 to C::__construct() expected to be a reference, value given in %sbug42976.php on line 15
+
+Warning: Invocation of C's constructor failed in %sbug42976.php on line 15
 string(10) "x.original"
 
-Warning: Invocation of C's constructor failed in %s/bug42976.php on line %d
+Warning: Parameter 1 to C::__construct() expected to be a reference, value given in %sbug42976.php on line 18
+
+Warning: Invocation of C's constructor failed in %sbug42976.php on line 18
 string(10) "x.original"
 Done
+--UEXPECTF--   
+unicode(9) "x.changed"
+
+Warning: Parameter 1 to C::__construct() expected to be a reference, value given in %sbug42976.php on line 15
+
+Warning: Invocation of C's constructor failed in %sbug42976.php on line 15
+unicode(10) "x.original"
+
+Warning: Parameter 1 to C::__construct() expected to be a reference, value given in %sbug42976.php on line 18
+
+Warning: Invocation of C's constructor failed in %sbug42976.php on line 18
+unicode(10) "x.original"
+Done
index cc942ffa64ebea462b37dfaa71271dcc7395a2c2..17461a312ba3786b941876d125f049d584d122fa 100644 (file)
@@ -12,13 +12,16 @@ var_dump(call_user_func("strlen", $a));
 
 echo "Done\n";
 ?>
---EXPECTF--    
+--EXPECTF--
+Warning: Parameter 1 to sort() expected to be a reference, value given in %sbug41970.php on line 5
 NULL
 
-Notice: Array to string conversion in %s on line %d
+Notice: Array to string conversion in %sbug41970.php on line 6
 int(5)
+
+Warning: Parameter 1 to sort() expected to be a reference, value given in %sbug41970.php on line 7
 NULL
 
-Notice: Array to string conversion in %s on line %d
+Notice: Array to string conversion in %sbug41970.php on line 8
 int(5)
 Done