php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #69772 Unexpected behavior at console.
Submitted: 2015-06-08 15:38 UTC Modified: 2015-06-08 18:52 UTC
From: pawel dot samysev at gmail dot com Assigned: cmb (profile)
Status: Duplicate Package: Scripting Engine problem
PHP Version: 5.5.25 OS: Ubuntu 14.04
Private report: No CVE-ID: None
 [2015-06-08 15:38 UTC] pawel dot samysev at gmail dot com
Description:
------------
At console script code return NULL without any notice.


Test script:
---------------
$f = false;
var_dump($f[33]);

Expected result:
----------------
Notice: Undefined offset: 33 

Actual result:
--------------
NULL

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2015-06-08 17:11 UTC] cmb@php.net
-Status: Open +Status: Feedback -Assigned To: +Assigned To: cmb
 [2015-06-08 17:11 UTC] cmb@php.net
Quite likely E_NOTICE is not included in the error reporting. What
is the output of

  var_dump(error_reporting());
 [2015-06-08 17:57 UTC] pawel dot samysev at gmail dot com
-Status: Feedback +Status: Assigned
 [2015-06-08 17:57 UTC] pawel dot samysev at gmail dot com
var_dump(error_reporting());
return  int(32767) , value of E_ALL
 [2015-06-08 18:10 UTC] cmb@php.net
-Status: Assigned +Status: Duplicate
 [2015-06-08 18:10 UTC] cmb@php.net
I should have read the report more thoroughly in the first place.
The described behavior is known, and already reported as bug
#54155 (and several others, IIRC).
 [2015-06-08 18:52 UTC] pawel dot samysev at gmail dot com
Thank for your attension
 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed Oct 23 02:01:31 2019 UTC