#36675 [Opn]: Cannot use an object with boolean expression
| From: | iain at iaindooley dot com | Date: | Thu, 06 Apr 2006 05:25:31 +0000 |
| Subject: | #36675 [Opn]: Cannot use an object with boolean expression | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-95405@lists.php.net to get a copy of this message | ||
ID: 36675
User updated by: iain at iaindooley dot com
Reported By: iain at iaindooley dot com
Status: Open
Bug Type: Class/Object related
Operating System: FreeBSD 6.0
PHP Version: 5.1.2
New Comment:
I used CVS to checkout 5.1.3RC3-dev and the problem has miraculously
evaporated.
Previous Comments:
------------------------------------------------------------------------
[2006-03-10 06:20:24] iain at iaindooley dot com
Description:
------------
object cannot be used in a boolean logic comparison.
Reproduce code:
---------------
$view here is of the class RsmlView:
if($view = $this->getView($view_name))
{
if($view!='DO NOT DISPLAY')
$view->display($this);
}
Expected result:
----------------
nothing special, just a boolean result
Actual result:
--------------
this code produces the notice:
Notice: Object of class RsmlView could not be converted to int
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36675&edit=1