Bug #55487 [Opn->Bgs]: crash when calling of empty and isset functions
| From: | pajoye@php.net | Date: | Tue, 23 Aug 2011 09:40:36 +0000 |
| Subject: | Bug #55487 [Opn->Bgs]: crash when calling of empty and isset functions | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-162841@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=55487&edit=1
ID: 55487
Updated by: pajoye@php.net
Reported by: jamal at tantaoui dot com
Summary: crash when calling of empty and isset functions
-Status: Open
+Status: Bogus
Type: Bug
Package: Reproducible crash
Operating System: Windows XP SP3
PHP Version: 5.3.7
Block user comment: N
Private report: N
New Comment:
There is no crash but an error:
"Fatal error: Can't use method return value in write context in G:\php-sdk\php-
src\55487.php on line 17"
Check your log or enable display_error in development mode.
Previous Comments:
------------------------------------------------------------------------
[2011-08-23 09:37:18] jamal at tantaoui dot com
Description:
------------
calling a class instance in isset causes an error 500
Test script:
---------------
<?php
class MyClass {
private $myobj;
public function __construct()
{
$this->myobj = 'Test OK';
}
public function getMyObject()
{
return $this->myobj;
}
}
$instance = new MyClass();
echo empty($instance->getMyObject()) ? 'Empty value' : $instance->getMyObject();
//$myobj = $instance->getMyObject();
//echo empty($myobj) ? 'Empty value' : $instance->getMyObject(); //Work correctly
?>
Expected result:
----------------
Test OK
Actual result:
--------------
500 Internal Server Error
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=55487&edit=1