#26059 [Opn->Ver]: Call to __set() crashes Apache when setting array element!

From: Date: Fri, 31 Oct 2003 21:59:30 +0000
Subject: #26059 [Opn->Ver]: Call to __set() crashes Apache when setting array element!
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-49795@lists.php.net to get a copy of this message
ID: 26059 Updated by: iliaa@php.net Reported By: myle34 at hotmail dot com -Status: Open +Status: Verified Bug Type: Reproducible crash -Operating System: Windows XP +Operating System: All PHP Version: 5CVS-2003-10-31 (dev) Previous Comments: ------------------------------------------------------------------------ [2003-10-31 12:41:29] myle34 at hotmail dot com 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 this bug report at http://bugs.php.net/?id=26059&edit=1

« previous php.bugs (#49795) next »