summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2009-03-16 09:51:32 +0000
committerDmitry Stogov <dmitry@php.net>2009-03-16 09:51:32 +0000
commitcc91da1bd7bd37475d06d3d26c731fabf9da065d (patch)
treee692669dbd721402bc99bbc12000c223c05e2b87
parent6e2521f0704696a8fd5d5cab0e120ea59da5ca8a (diff)
downloadphp-git-cc91da1bd7bd37475d06d3d26c731fabf9da065d.tar.gz
Fixed bug #47664 (get_class returns NULL instead of FALSE)
-rw-r--r--NEWS1
-rw-r--r--Zend/tests/009.phpt2
-rw-r--r--Zend/zend_builtin_functions.c2
-rw-r--r--ext/standard/tests/class_object/get_class_error_001.phpt2
-rw-r--r--ext/standard/tests/class_object/get_class_variation_001.phpt110
5 files changed, 59 insertions, 58 deletions
diff --git a/NEWS b/NEWS
index e22b0994ff..60bab0e669 100644
--- 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)
diff --git a/Zend/tests/009.phpt b/Zend/tests/009.phpt
index 3efda91b68..f122b714da 100644
--- a/Zend/tests/009.phpt
+++ b/Zend/tests/009.phpt
@@ -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
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index 3dbd080510..6f1774de27 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -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) {
diff --git a/ext/standard/tests/class_object/get_class_error_001.phpt b/ext/standard/tests/class_object/get_class_error_001.phpt
index fb3bacb904..555099502d 100644
--- a/ext/standard/tests/class_object/get_class_error_001.phpt
+++ b/ext/standard/tests/class_object/get_class_error_001.phpt
@@ -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
diff --git a/ext/standard/tests/class_object/get_class_variation_001.phpt b/ext/standard/tests/class_object/get_class_variation_001.phpt
index 2e83b1dc5e..79caa1f30d 100644
--- a/ext/standard/tests/class_object/get_class_variation_001.phpt
+++ b/ext/standard/tests/class_object/get_class_variation_001.phpt
@@ -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