php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #67149 Every array index of a NULL value exists
Submitted: 2014-04-28 21:10 UTC Modified: 2014-04-28 21:28 UTC
From: lezso69 at gmail dot com Assigned:
Status: Duplicate Package: Arrays related
PHP Version: 5.5.11 OS: Linux
Private report: No CVE-ID: None
 [2014-04-28 21:10 UTC] lezso69 at gmail dot com
Description:
------------
---
From manual page: http://www.php.net/language.types.null
---

When I assign a NULL value to a variable, and access it as an array, I got no warning.

Test script:
---------------
<?php
$notarray = null;
var_dump($notarray[0]);

Expected result:
----------------
Some warning should be shown.

Actual result:
--------------
Just returns NULL.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-04-28 21:28 UTC] requinix@php.net
-Status: Open +Status: Duplicate -Type: Bug +Type: Feature/Change Request
 [2014-04-28 21:28 UTC] requinix@php.net
See bug #62769.
 [2014-04-28 21:28 UTC] requinix@php.net
-Type: Feature/Change Request +Type: Bug
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Dec 04 09:01:30 2024 UTC