#43982 [Opn->Bgs]: Running specific error code without any error messages

From: Date: Fri, 01 Feb 2008 22:24:35 +0000
Subject: #43982 [Opn->Bgs]: Running specific error code without any error messages
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-121876@lists.php.net to get a copy of this message
ID: 43982 Updated by: jani@php.net Reported By: php at ert dot org dot ua -Status: Open +Status: Bogus Bug Type: Scripting Engine problem Operating System: WinXP PHP Version: 5.2.5 New Comment: Documented behaviour -> bogus. Previous Comments: ------------------------------------------------------------------------ [2008-01-31 17:01:13] root at mantoru dot de Accessing offsets is only supported for strings and arrays. As the manual states: "Accessing by [] or {} to variables of other type silently returns NULL." See also http://php.net/language.types.string and bug #41195. ------------------------------------------------------------------------ [2008-01-30 10:24:19] php at ert dot org dot ua Description: ------------ When I try to index some scalar value (integer, for example), I want to get error message, but I have normal NULL result. Reproduce code: --------------- <? error_reporting(0xFFFFFFFF); $a = 1; if ($a[5]) echo 'yes'; else echo 'no'; ?> Expected result: ---------------- Error, warning or notice Actual result: -------------- no ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43982&edit=1

« previous php.bugs (#121876) next »