php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #41210 unexpected behaviour on access null as an associative array
Submitted: 2007-04-27 07:43 UTC Modified: 2007-04-27 08:03 UTC
From: bgoldschmidt at rapidsoft dot de Assigned:
Status: Not a bug Package: Feature/Change Request
PHP Version: 5.2.1 OS: debian
Private report: No CVE-ID: None
 [2007-04-27 07:43 UTC] bgoldschmidt at rapidsoft dot de
Description:
------------
Trying to access null as an associative array works just fine and doesn't result in an error, as it should.

Reproduce code:
---------------
<?php

$testarray = null;

$a = $testarray['test'];  // this should yield to an error

echo('$a = '.$a); // outputs '$a = '

?>

Expected result:
----------------
An error.


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-04-27 08:03 UTC] johannes@php.net
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

.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 08 02:01:32 2024 UTC