Skip to content

Commit

Permalink
Fixed bug #47664 (get_class returns NULL instead of FALSE)
Browse files Browse the repository at this point in the history
  • Loading branch information
dstogov committed Mar 16, 2009
1 parent 6e2521f commit cc91da1
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 58 deletions.
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion Zend/tests/009.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion Zend/zend_builtin_functions.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion ext/standard/tests/class_object/get_class_error_001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
110 changes: 55 additions & 55 deletions ext/standard/tests/class_object/get_class_variation_001.phpt
Original file line number Diff line number Diff line change
Expand Up @@ -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
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

0 comments on commit cc91da1

Please sign in to comment.