#26059 [NEW]: Call to __set() crashes Apache when setting array element!
by myle34 at hotmail dot com other posts by this author
Oct 31 2003 5:41PM messages near this date
#26060 [Opn->Fbk]: Not closing download handles
|
#26059 [Ver->Csd]: Call to __set() crashes when setting array element
From: myle34 at hotmail dot com
Operating system: Windows XP
PHP version: 5CVS-2003-10-31 (dev)
PHP Bug Type: Reproducible crash
Bug description: Call to __set() crashes Apache when setting array element!
Description:
------------
I am using PHP5-b2 and Apache 2.0.47 with Windows XP. Apache crashes when
the below code is run.
Reproduce code:
---------------
class Foo {
private $bar = array();
function __get($var) {
return(isset($this-> bar[$var]) ? $this->bar[$var] : NULL);
}
function __set($var,$val) {
$this-> bar[$var] = $val;
}
}
$foo = new Foo();
// Works
// $foo-> test = array('testing'=>'testing, 1...2...3...');
// Doesn't work, crashes Apache
$foo-> test = array();
$foo-> test['testing'] = 'testing, 1...2...3...';
print_r($foo-> test);
Expected result:
----------------
Array
(
[testing] => testing, 1...2...3...
)
Actual result:
--------------
Apache crashes! No output.
--
Edit bug report at http://bugs.php.net/?id=26059&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26059&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26059&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=26059&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=26059&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=26059&r=needtrace
Try newer version: http://bugs.php.net/fix.php?id=26059&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=26059&r=support
Expected behavior: http://bugs.php.net/fix.php?id=26059&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=26059&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=26059&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=26059&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26059&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=26059&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=26059&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=26059&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26059&r=float
Thread:
myle34 at hotmail dot com
|