php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #14845 var_dump sometimes crashes after array stringitem is overwriten with arrayitem.
Submitted: 2002-01-04 06:43 UTC Modified: 2010-12-01 16:10 UTC
From: leen at wirehub dot nl Assigned: jani (profile)
Status: Closed Package: *General Issues
PHP Version: 4.1.1 OS: Windows&Linux (probably all)
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: leen at wirehub dot nl
New email:
PHP Version: OS:

 

 [2002-01-04 06:43 UTC] leen at wirehub dot nl
When een item in an Array is string it can not be overwriten with an array. This is ok with me, but PHP doesn't give a warning either:

$myarray = Array ();

$var = Array ();

$var ['NAME1'] = 'string';
$var ['NAME1'] ['NAME2'] ['NAME3'] = $myarray;

print "<pre>";
print_r ($var);
print "</pre>";

$var = Array ();
$var ['NAME1'] = 'string';
$var ['NAME1'] ['NAME2'] = Array ();

print "<pre>";
print_r ($var);
print "</pre>";

result:

Array
(
    [NAME1] => string
)

   Warning: Array to string conversion in /var/sites/p3/pageprocessor/pageprocessor3.0/www/dsdic.php on line 37
Array
(
    [NAME1] => Atring
)


This behaviour is very hard to debug (with 3.000+ lines of code or so and more then one person working on it). :)

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-12-21 10:51 UTC] moriyoshi@php.net
Please see http://bugs.php.net/19943

 [2010-12-01 16:10 UTC] jani@php.net
-Status: Analyzed +Status: Closed -Package: Feature/Change Request +Package: *General Issues -Assigned To: +Assigned To: jani
 [2010-12-01 16:10 UTC] jani@php.net
Causes an error nowadays.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed May 01 23:01:28 2024 UTC