php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43982 Running specific error code without any error messages
Submitted: 2008-01-30 10:24 UTC Modified: 2008-02-01 22:24 UTC
From: php at ert dot org dot ua Assigned:
Status: Not a bug Package: Scripting Engine problem
PHP Version: 5.2.5 OS: WinXP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: php at ert dot org dot ua
New email:
PHP Version: OS:

 

 [2008-01-30 10:24 UTC] 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

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-01-31 17:01 UTC] 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-02-01 22:24 UTC] jani@php.net
Documented behaviour -> bogus.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 13:01:32 2024 UTC