ID: 42575 Updated by: [EMAIL PROTECTED] Reported By: adamrbar at gmail dot com -Status: Open +Status: Bogus Bug Type: Class/Object related Operating System: Windows Vista PHP Version: 5.2.4 New Comment:
Thank you for taking the time to write to us, but this is not a bug. Please double-check the documentation available at http://www.php.net/manual/ and the instructions on how to report a bug at http://bugs.php.net/how-to-report.php Previous Comments: ------------------------------------------------------------------------ [2007-09-06 10:30:00] adamrbar at gmail dot com Description: ------------ I have a class with simple property, without any given type or value. Trying to access this property as it will be an array (i.e. getting its index, which is obviously undefined), should generate a notice when E_STRICT is set - but it doesn't. Specifying the property type as array or adding other index generates notice as expected. Reproduce code: --------------- error_reporting(E_ALL | E_STRICT); class test { private $bla; public function __construct() { var_dump(empty($this->bla)); var_dump($this->bla['fff']); } } $x = new test(); Expected result: ---------------- bool(true) Notice: Undefined index: fff in [...] NULL Actual result: -------------- bool(true) NULL ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42575&edit=1