]> 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:51:32 +0000 (09:51 +0000)
committerDmitry Stogov <dmitry@php.net>
Mon, 16 Mar 2009 09:51:32 +0000 (09:51 +0000)
NEWS
Zend/tests/009.phpt
Zend/zend_builtin_functions.c
ext/standard/tests/class_object/get_class_error_001.phpt
ext/standard/tests/class_object/get_class_variation_001.phpt

diff --git a/NEWS b/NEWS
index e22b0994ff76123f731707e2da659a03c7b3d75e..60bab0e669216f9f1d30d624f6aee0b2d2b5aed2 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -8,6 +8,7 @@ PHP                                                                        NEWS
 
 - Added LIBXML_LOADED_VERSION constant (libxml2 version currently used). (Rob)
 
+- Fixed bug #47664 (get_class returns NULL instead of FALSE). (Dmitry)
 - Fixed bug #47593 (interface_exists() returns false when using absolute 
   namespace path). (Kalle, Felipe)
 - Fixed bug #47572 (Undefined constant causes segmentation fault). (Felipe)
index 3efda91b684bfa69f8775828bce1321026f7e177..f122b714dac2f735a30a70ebd0a869e6af032131 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, string given in %s on line %d
-NULL
+bool(false)
 string(3) "foo"
 string(4) "foo2"
 Done
index 3dbd0805103077739a9fb85306c0923f8924b1c2..6f1774de273a802b1aef3521836c70c8c1364d79 100644 (file)
@@ -719,7 +719,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 fb3bacb904ef840f65318b7d943bc4650ea22df5..555099502dd814d3dea757a1f9a36952a246d7ac 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 14
-NULL
+bool(false)
 Done
\ No newline at end of file
index 2e83b1dc5eea76de6675f0eaf2ef56e8b7c3a299..79caa1f30d1716e2d114b23ca20ee0e527e83c18 100644 (file)
@@ -76,137 +76,137 @@ echo "Done";
 --EXPECTF--
 *** Testing get_class() : usage variations ***
 
-Notice: Undefined variable: undefined_var in %s on line 58
+Notice: Undefined variable: undefined_var in /home/dmitry/php/php5.3/ext/standard/tests/class_object/get_class_variation_001.php on line 58
 
-Notice: Undefined variable: unset_var in %s on line 61
+Notice: Undefined variable: unset_var in /home/dmitry/php/php5.3/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/php5.3/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/php5.3/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/php5.3/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/php5.3/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/php5.3/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/php5.3/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/php5.3/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/php5.3/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/php5.3/ext/standard/tests/class_object/get_class_variation_001.php on line 68
+bool(false)
 
 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/php5.3/ext/standard/tests/class_object/get_class_variation_001.php on line 68
+bool(false)
 
 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/php5.3/ext/standard/tests/class_object/get_class_variation_001.php on line 68
+bool(false)
 
 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/php5.3/ext/standard/tests/class_object/get_class_variation_001.php on line 68
+bool(false)
 
 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/php5.3/ext/standard/tests/class_object/get_class_variation_001.php on line 68
+bool(false)
 
 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/php5.3/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/php5.3/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/php5.3/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/php5.3/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/php5.3/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/php5.3/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/php5.3/ext/standard/tests/class_object/get_class_variation_001.php on line 68
+bool(false)
 
 Arg value:  (type: string)
 
-Warning: get_class() expects parameter 1 to be object, string given in %s on line %d
-NULL
+Warning: get_class() expects parameter 1 to be object, string given in /home/dmitry/php/php5.3/ext/standard/tests/class_object/get_class_variation_001.php on line 68
+bool(false)
 
 Arg value:  (type: string)
 
-Warning: get_class() expects parameter 1 to be object, string given in %s on line %d
-NULL
+Warning: get_class() expects parameter 1 to be object, string given in /home/dmitry/php/php5.3/ext/standard/tests/class_object/get_class_variation_001.php on line 68
+bool(false)
 
 Arg value: string (type: string)
 
-Warning: get_class() expects parameter 1 to be object, string given in %s on line %d
-NULL
+Warning: get_class() expects parameter 1 to be object, string given in /home/dmitry/php/php5.3/ext/standard/tests/class_object/get_class_variation_001.php on line 68
+bool(false)
 
 Arg value: string (type: string)
 
-Warning: get_class() expects parameter 1 to be object, string given in %s on line %d
-NULL
+Warning: get_class() expects parameter 1 to be object, string given in /home/dmitry/php/php5.3/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/php5.3/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
-Done
\ No newline at end of file
+Warning: get_class() expects parameter 1 to be object, null given in /home/dmitry/php/php5.3/ext/standard/tests/class_object/get_class_variation_001.php on line 68
+bool(false)
+Done