#47664 [Opn->Bgs]: get_class returns NULL instead of FALSE.
| From: | pajoye@php.net | Date: | Sun, 15 Mar 2009 15:22:39 +0000 |
| Subject: | #47664 [Opn->Bgs]: get_class returns NULL instead of FALSE. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-134719@lists.php.net to get a copy of this message | ||
ID: 47664
Updated by: pajoye@php.net
Reported By: wiebe at wiebelt dot nl
-Status: Open
+Status: Bogus
Bug Type: Class/Object related
Operating System: Ubuntu 8.10
PHP Version: 5.3.0beta1
New Comment:
invalid argument returns NULL, not false.
Previous Comments:
------------------------------------------------------------------------
[2009-03-15 15:13:59] wiebe at wiebelt dot nl
Description:
------------
get_class returns NULL when using it with a string instead of FALSE.
Reproduce code:
---------------
<?php
var_dump(get_class('test'));
Expected result:
----------------
bool(false)
Actual result:
--------------
Warning: get_class() expects parameter 1 to be object, string given in
/home/wiebe/run.php on line 34
NULL
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47664&edit=1