#46913 [Opn]: Returning of bool types directly in return function returns null

From: Date: Sat, 20 Dec 2008 13:29:51 +0000
Subject: #46913 [Opn]: Returning of bool types directly in return function returns null
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-132195@lists.php.net to get a copy of this message
ID: 46913 User updated by: OrminAPO at gmail dot com Reported By: OrminAPO at gmail dot com Status: Open Bug Type: Unknown/Other Function Operating System: Windows XP Professional SP 2 PHP Version: 5.2.8 New Comment: Forgot to add - Function is from class, so examlple should be: $log = $account->isLogged(); Previous Comments: ------------------------------------------------------------------------ [2008-12-20 13:28:03] OrminAPO at gmail dot com Description: ------------ It doesn't returns bool type properly when bool type inserted into return. Reproduce code: --------------- function isLogged() { if(is_numeric($this->ID)) return true; else return false; } $log = isLogged(); // Returns NULL Expected result: ---------------- $log = bool(false); Actual result: -------------- $log = null; ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=46913&edit=1

« previous php.bugs (#132195) next »