|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-05-13 09:14 UTC] derick@php.net
[2004-05-21 01:00 UTC] php-bugs at lists dot php dot net
[2004-05-21 02:05 UTC] Kattana_ at hotmail dot com
[2004-09-06 14:31 UTC] nlopess@php.net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 29 13:00:01 2025 UTC |
Description: ------------ I am running php5rc2 and apache 2.0.49 on winXP sp1. php4 compatability is enabled. When running the following piece of code i got Application error from apache.exe. the error text is "The instruction at "0x0068d6ff" referenced memory at 0xffffffff. The memory could not be "read"." The line causeing the error is: $this->documentElement->appendChild($element); Reproduce code: --------------- class Authors extends DomDocument { function __construct() { //has to be called! parent::__construct(); } function addAuthor($name,$password,$group) { $item = $this->createElement('author'); $attr = $item->setAttribute('name',$name); $attr = $item->setAttribute('password',md5($password)); if($group=='none'){ $this->documentElement->appendChild($item); }else{ foreach($this->documentElement->childNodes as $element){ if($element->nodeName == 'group' && $element->getAttribute('name') == $group){ $element->appendChild($item); $this->documentElement->appendChild($element); } } } } } Expected result: ---------------- Unknown The line: $element->appendChild($item); wasnt appending the child so i was testing some quick hacks to see what would work. Actual result: -------------- PHP crash and no output.