php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13999 Invalid array initialization will crash Apache !?
Submitted: 2001-11-09 13:22 UTC Modified: 2001-11-09 14:06 UTC
From: g dot noel at symphonieonline dot com Assigned:
Status: Closed Package: Reproducible crash
PHP Version: 4.0.6 OS: Apache - Linux / Windows
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: g dot noel at symphonieonline dot com
New email:
PHP Version: OS:

 

 [2001-11-09 13:22 UTC] g dot noel at symphonieonline dot com
This code will crash apache :

<?php
$a = '';
$i = 'TEST';
if (!isset($a['BUG'][$i])) {
    $a['BUG'][$i] = 'SAMPLE';
}
?>

But not this one :

<?php
$a = '';
$i = 'TEST';
$a['BUG'][$i] = 'SAMPLE';
?>

Nor this one :

<?php
$a = array();
$i = 'TEST';
if (!isset($a['BUG'][$i])) {
    $a['BUG'][$i] = 'SAMPLE';
}
?>

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-11-09 14:06 UTC] cardinal@php.net
Reproduced in 4.0.6, but looks like it's fixed in 4.1.0 RC1
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue May 06 02:01:28 2025 UTC