com php-src: Revert "Merge branch 'pull-request/2082' (get_class accidentally in PHP-7.1)": Z end/tests/009.phpt Zend/zend_builtin_functions. c
ext/standard/tests/class_object/get_class_variation _001.phpt
| From: | Bob Weinand | Date: | Thu, 13 Oct 2016 08:40:42 +0000 |
| Subject: | com php-src: Revert "Merge branch 'pull-request/2082' (get_class accidentally in PHP-7.1)": Z end/tests/009.phpt Zend/zend_builtin_functions. c ext/standard/tests/class_object/get_class_variation _001.phpt |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-95014@lists.php.net to get a copy of this message | ||
Commit: 505417e8eba0339b8ce68ea0bb46ba613bb4d2a9
Author: Bob Weinand <bobwei9@hotmail.com> Thu, 13 Oct 2016 10:40:00 +0200
Parents: 57354e0313cba1186fd05f74e1c418525269e7f2
Branches: PHP-7.1
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=505417e8eba0339b8ce68ea0bb46ba613bb4d2a9
Log:
Revert "Merge branch 'pull-request/2082' (get_class accidentally in PHP-7.1)"
This reverts commit b0cacee3031b9f8ae983db3a690707b0ed68f7f8, reversing
changes made to fcbfd9835de536ea5a487492da56dac548a096e1.
Changed paths:
M Zend/tests/009.phpt
M Zend/zend_builtin_functions.c
M ext/standard/tests/class_object/get_class_variation_001.phpt
Diff:
diff --git a/Zend/tests/009.phpt b/Zend/tests/009.phpt
index 0dc9453..b44a6ba 100644
--- a/Zend/tests/009.phpt
+++ b/Zend/tests/009.phpt
@@ -7,10 +7,6 @@ class foo {
function bar () {
var_dump(get_class());
}
- function testNull ()
- {
- var_dump(get_class(null));
- }
}
class foo2 extends foo {
@@ -31,8 +27,6 @@ var_dump(get_class("qwerty"));
var_dump(get_class($f1));
var_dump(get_class($f2));
-$f1->testNull();
-
echo "Done\n";
?>
--EXPECTF--
@@ -51,7 +45,4 @@ Warning: get_class() expects parameter 1 to be object, string given in %s on lin
bool(false)
string(3) "foo"
string(4) "foo2"
-
-Warning: get_class() expects parameter 1 to be object, null given in %s on line %d
-bool(false)
Done
diff --git a/Zend/zend_builtin_functions.c b/Zend/zend_builtin_functions.c
index d99ebb2..0fb0036 100644
--- a/Zend/zend_builtin_functions.c
+++ b/Zend/zend_builtin_functions.c
@@ -1001,7 +1001,7 @@ ZEND_FUNCTION(get_class)
{
zval *obj = NULL;
- if (zend_parse_parameters(ZEND_NUM_ARGS(), "|o", &obj) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "|o!", &obj) == FAILURE) {
RETURN_FALSE;
}
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 3987968..d39da3a 100644
--- a/ext/standard/tests/class_object/get_class_variation_001.phpt
+++ b/ext/standard/tests/class_object/get_class_variation_001.phpt
@@ -152,12 +152,12 @@ bool(false)
Arg value: (type: NULL)
-Warning: get_class() expects parameter 1 to be object, null given in %s on line %d
+Warning: get_class() called without object from outside a class in %sget_class_variation_001.php on
line %d
bool(false)
Arg value: (type: NULL)
-Warning: get_class() expects parameter 1 to be object, null given in %s on line %d
+Warning: get_class() called without object from outside a class in %sget_class_variation_001.php on
line %d
bool(false)
Arg value: 1 (type: boolean)
@@ -202,11 +202,11 @@ bool(false)
Arg value: (type: NULL)
-Warning: get_class() expects parameter 1 to be object, null given in %s on line %d
+Warning: get_class() called without object from outside a class in %sget_class_variation_001.php on
line %d
bool(false)
Arg value: (type: NULL)
-Warning: get_class() expects parameter 1 to be object, null given in %s on line %d
+Warning: get_class() called without object from outside a class in %sget_class_variation_001..php
on line %d
bool(false)
Done