summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry Stogov <dmitry@php.net>2009-03-16 09:52:26 +0000
committerDmitry Stogov <dmitry@php.net>2009-03-16 09:52:26 +0000
commitd3e3c4e666b04a0f99bf399a75cb4bf092e7e6a1 (patch)
tree83715cb4a103a08196717440ae24152b74f5a3d4
parent2d574c99d332f4ec153007629d3c881832d77ae5 (diff)
downloadphp-git-d3e3c4e666b04a0f99bf399a75cb4bf092e7e6a1.tar.gz
Fixed bug #47664 (get_class returns NULL instead of FALSE)
-rw-r--r--Zend/tests/009.phpt2
-rw-r--r--Zend/zend_builtin_functions.c2
-rwxr-xr-xext/reflection/tests/027.phpt2
-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.phpt118
5 files changed, 63 insertions, 63 deletions
diff --git a/Zend/tests/009.phpt b/Zend/tests/009.phpt
index 3dd8bac771..3b24c2c955 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, Unicode string given in %s on line %d
-NULL
+bool(false)
unicode(3) "foo"
unicode(4) "foo2"
Done
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index c4c797dd20..078514725b 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -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) {
diff --git a/ext/reflection/tests/027.phpt b/ext/reflection/tests/027.phpt
index 7839add64f..faccbb6276 100755
--- a/ext/reflection/tests/027.phpt
+++ b/ext/reflection/tests/027.phpt
@@ -51,7 +51,7 @@ Closure [ <user> function {closure} ] {
}
}
-NULL
+bool(false)
unicode(9) "{closure}"
bool(true)
Closure [ <user> public method func ] {
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 ee994fcb7c..0a175fcf97 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 %d
-NULL
+bool(false)
Done
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 36d7ebb400..0c5cca6544 100644
--- a/ext/standard/tests/class_object/get_class_variation_001.phpt
+++ b/ext/standard/tests/class_object/get_class_variation_001.phpt
@@ -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