]> granicus.if.org Git - php/commitdiff
Fixed bug #47664 (get_class returns NULL instead of FALSE)
authorDmitry Stogov <dmitry@php.net>
Mon, 16 Mar 2009 09:52:26 +0000 (09:52 +0000)
committerDmitry Stogov <dmitry@php.net>
Mon, 16 Mar 2009 09:52:26 +0000 (09:52 +0000)
Zend/tests/009.phpt
Zend/zend_builtin_functions.c
ext/reflection/tests/027.phpt
ext/standard/tests/class_object/get_class_error_001.phpt
ext/standard/tests/class_object/get_class_variation_001.phpt

index 3dd8bac771f2c3701b6476d8965e5816519461bc..3b24c2c955dad6c85862cc2d4d9d95051ed8fccf 100644 (file)
@@ -42,7 +42,7 @@ Warning: get_class() called without object from outside a class in %s on line %d
 bool(false)
 
 Warning: get_class() expects parameter 1 to be object, Unicode string given in %s on line %d
-NULL
+bool(false)
 unicode(3) "foo"
 unicode(4) "foo2"
 Done
index c4c797dd208a145c9109f08845225c117eb137eb..078514725b0735b7f6915c91efc3f750a7dd372f 100644 (file)
@@ -716,7 +716,7 @@ ZEND_FUNCTION(get_class)
        int dup;
 
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|o", &obj) == FAILURE) {
-               return;
+               RETURN_FALSE;
        }
 
        if (!obj) {
index 7839add64ff61d3335dba54e57ac9a4b58aab048..faccbb627657302d1c0ccef0f47db1a3b2bc3de5 100755 (executable)
@@ -51,7 +51,7 @@ Closure [ <user> function {closure} ] {
   }
 }
 
-NULL
+bool(false)
 unicode(9) "{closure}"
 bool(true)
 Closure [ <user> public method func ] {
index ee994fcb7c2986807cd0780fde039d4f932d99c2..0a175fcf97d9f5e4b450eee25f4b0ae7eb59fdcd 100644 (file)
@@ -24,5 +24,5 @@ echo "Done";
 -- Testing get_class() function with more than expected no. of arguments --
 
 Warning: get_class() expects at most 1 parameter, 2 given in %s on line %d
-NULL
+bool(false)
 Done
index 36d7ebb400529474af2aac819d4cc328b055f5d2..0c5cca6544fd3ddabb1e5b180f60a9432b80af16 100644 (file)
@@ -76,147 +76,147 @@ echo "Done";
 --EXPECTF--
 *** Testing get_class() : usage variations ***
 
-Notice: Undefined variable: undefined_var in %s on line %d
+Notice: Undefined variable: undefined_var in /home/dmitry/php/php6/ext/standard/tests/class_object/get_class_variation_001.php on line 58
 
-Notice: Undefined variable: unset_var in %s on line %d
+Notice: Undefined variable: unset_var in /home/dmitry/php/php6/ext/standard/tests/class_object/get_class_variation_001.php on line 61
 
 Arg value: 0 (type: integer)
 
-Warning: get_class() expects parameter 1 to be object, integer given in %s on line %d
-NULL
+Warning: get_class() expects parameter 1 to be object, integer given in /home/dmitry/php/php6/ext/standard/tests/class_object/get_class_variation_001.php on line 68
+bool(false)
 
 Arg value: 1 (type: integer)
 
-Warning: get_class() expects parameter 1 to be object, integer given in %s on line %d
-NULL
+Warning: get_class() expects parameter 1 to be object, integer given in /home/dmitry/php/php6/ext/standard/tests/class_object/get_class_variation_001.php on line 68
+bool(false)
 
 Arg value: 12345 (type: integer)
 
-Warning: get_class() expects parameter 1 to be object, integer given in %s on line %d
-NULL
+Warning: get_class() expects parameter 1 to be object, integer given in /home/dmitry/php/php6/ext/standard/tests/class_object/get_class_variation_001.php on line 68
+bool(false)
 
 Arg value: -2345 (type: integer)
 
-Warning: get_class() expects parameter 1 to be object, integer given in %s on line %d
-NULL
+Warning: get_class() expects parameter 1 to be object, integer given in /home/dmitry/php/php6/ext/standard/tests/class_object/get_class_variation_001.php on line 68
+bool(false)
 
 Arg value: 10.5 (type: double)
 
-Warning: get_class() expects parameter 1 to be object, double given in %s on line %d
-NULL
+Warning: get_class() expects parameter 1 to be object, double given in /home/dmitry/php/php6/ext/standard/tests/class_object/get_class_variation_001.php on line 68
+bool(false)
 
 Arg value: -10.5 (type: double)
 
-Warning: get_class() expects parameter 1 to be object, double given in %s on line %d
-NULL
+Warning: get_class() expects parameter 1 to be object, double given in /home/dmitry/php/php6/ext/standard/tests/class_object/get_class_variation_001.php on line 68
+bool(false)
 
 Arg value: 101234567000 (type: double)
 
-Warning: get_class() expects parameter 1 to be object, double given in %s on line %d
-NULL
+Warning: get_class() expects parameter 1 to be object, double given in /home/dmitry/php/php6/ext/standard/tests/class_object/get_class_variation_001.php on line 68
+bool(false)
 
 Arg value: 1.07654321E-9 (type: double)
 
-Warning: get_class() expects parameter 1 to be object, double given in %s on line %d
-NULL
+Warning: get_class() expects parameter 1 to be object, double given in /home/dmitry/php/php6/ext/standard/tests/class_object/get_class_variation_001.php on line 68
+bool(false)
 
 Arg value: 0.5 (type: double)
 
-Warning: get_class() expects parameter 1 to be object, double given in %s on line %d
-NULL
+Warning: get_class() expects parameter 1 to be object, double given in /home/dmitry/php/php6/ext/standard/tests/class_object/get_class_variation_001.php on line 68
+bool(false)
 
-Notice: Array to string conversion in %s on line %d
+Notice: Array to string conversion in /home/dmitry/php/php6/ext/standard/tests/class_object/get_class_variation_001.php on line 67
 
 Arg value: Array (type: array)
 
-Warning: get_class() expects parameter 1 to be object, array given in %s on line %d
-NULL
+Warning: get_class() expects parameter 1 to be object, array given in /home/dmitry/php/php6/ext/standard/tests/class_object/get_class_variation_001.php on line 68
+bool(false)
 
-Notice: Array to string conversion in %s on line %d
+Notice: Array to string conversion in /home/dmitry/php/php6/ext/standard/tests/class_object/get_class_variation_001.php on line 67
 
 Arg value: Array (type: array)
 
-Warning: get_class() expects parameter 1 to be object, array given in %s on line %d
-NULL
+Warning: get_class() expects parameter 1 to be object, array given in /home/dmitry/php/php6/ext/standard/tests/class_object/get_class_variation_001.php on line 68
+bool(false)
 
-Notice: Array to string conversion in %s on line %d
+Notice: Array to string conversion in /home/dmitry/php/php6/ext/standard/tests/class_object/get_class_variation_001.php on line 67
 
 Arg value: Array (type: array)
 
-Warning: get_class() expects parameter 1 to be object, array given in %s on line %d
-NULL
+Warning: get_class() expects parameter 1 to be object, array given in /home/dmitry/php/php6/ext/standard/tests/class_object/get_class_variation_001.php on line 68
+bool(false)
 
-Notice: Array to string conversion in %s on line %d
+Notice: Array to string conversion in /home/dmitry/php/php6/ext/standard/tests/class_object/get_class_variation_001.php on line 67
 
 Arg value: Array (type: array)
 
-Warning: get_class() expects parameter 1 to be object, array given in %s on line %d
-NULL
+Warning: get_class() expects parameter 1 to be object, array given in /home/dmitry/php/php6/ext/standard/tests/class_object/get_class_variation_001.php on line 68
+bool(false)
 
-Notice: Array to string conversion in %s on line %d
+Notice: Array to string conversion in /home/dmitry/php/php6/ext/standard/tests/class_object/get_class_variation_001.php on line 67
 
 Arg value: Array (type: array)
 
-Warning: get_class() expects parameter 1 to be object, array given in %s on line %d
-NULL
+Warning: get_class() expects parameter 1 to be object, array given in /home/dmitry/php/php6/ext/standard/tests/class_object/get_class_variation_001.php on line 68
+bool(false)
 
 Arg value:  (type: NULL)
 
-Warning: get_class() expects parameter 1 to be object, null given in %s on line %d
-NULL
+Warning: get_class() expects parameter 1 to be object, null given in /home/dmitry/php/php6/ext/standard/tests/class_object/get_class_variation_001.php on line 68
+bool(false)
 
 Arg value:  (type: NULL)
 
-Warning: get_class() expects parameter 1 to be object, null given in %s on line %d
-NULL
+Warning: get_class() expects parameter 1 to be object, null given in /home/dmitry/php/php6/ext/standard/tests/class_object/get_class_variation_001.php on line 68
+bool(false)
 
 Arg value: 1 (type: boolean)
 
-Warning: get_class() expects parameter 1 to be object, boolean given in %s on line %d
-NULL
+Warning: get_class() expects parameter 1 to be object, boolean given in /home/dmitry/php/php6/ext/standard/tests/class_object/get_class_variation_001.php on line 68
+bool(false)
 
 Arg value:  (type: boolean)
 
-Warning: get_class() expects parameter 1 to be object, boolean given in %s on line %d
-NULL
+Warning: get_class() expects parameter 1 to be object, boolean given in /home/dmitry/php/php6/ext/standard/tests/class_object/get_class_variation_001.php on line 68
+bool(false)
 
 Arg value: 1 (type: boolean)
 
-Warning: get_class() expects parameter 1 to be object, boolean given in %s on line %d
-NULL
+Warning: get_class() expects parameter 1 to be object, boolean given in /home/dmitry/php/php6/ext/standard/tests/class_object/get_class_variation_001.php on line 68
+bool(false)
 
 Arg value:  (type: boolean)
 
-Warning: get_class() expects parameter 1 to be object, boolean given in %s on line %d
-NULL
+Warning: get_class() expects parameter 1 to be object, boolean given in /home/dmitry/php/php6/ext/standard/tests/class_object/get_class_variation_001.php on line 68
+bool(false)
 
 Arg value:  (type: unicode)
 
-Warning: get_class() expects parameter 1 to be object, Unicode string given in %s on line %d
-NULL
+Warning: get_class() expects parameter 1 to be object, Unicode string given in /home/dmitry/php/php6/ext/standard/tests/class_object/get_class_variation_001.php on line 68
+bool(false)
 
 Arg value:  (type: unicode)
 
-Warning: get_class() expects parameter 1 to be object, Unicode string given in %s on line %d
-NULL
+Warning: get_class() expects parameter 1 to be object, Unicode string given in /home/dmitry/php/php6/ext/standard/tests/class_object/get_class_variation_001.php on line 68
+bool(false)
 
 Arg value: string (type: unicode)
 
-Warning: get_class() expects parameter 1 to be object, Unicode string given in %s on line %d
-NULL
+Warning: get_class() expects parameter 1 to be object, Unicode string given in /home/dmitry/php/php6/ext/standard/tests/class_object/get_class_variation_001.php on line 68
+bool(false)
 
 Arg value: string (type: unicode)
 
-Warning: get_class() expects parameter 1 to be object, Unicode string given in %s on line %d
-NULL
+Warning: get_class() expects parameter 1 to be object, Unicode string given in /home/dmitry/php/php6/ext/standard/tests/class_object/get_class_variation_001.php on line 68
+bool(false)
 
 Arg value:  (type: NULL)
 
-Warning: get_class() expects parameter 1 to be object, null given in %s on line %d
-NULL
+Warning: get_class() expects parameter 1 to be object, null given in /home/dmitry/php/php6/ext/standard/tests/class_object/get_class_variation_001.php on line 68
+bool(false)
 
 Arg value:  (type: NULL)
 
-Warning: get_class() expects parameter 1 to be object, null given in %s on line %d
-NULL
+Warning: get_class() expects parameter 1 to be object, null given in /home/dmitry/php/php6/ext/standard/tests/class_object/get_class_variation_001.php on line 68
+bool(false)
 Done