note 70239 deleted from ref.xml by bjori
| From: | bjori@php.net | Date: | Mon, 09 Oct 2006 10:54:23 +0000 |
| Subject: | note 70239 deleted from ref.xml by bjori | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-118247@lists.php.net to get a copy of this message | ||
Note Submitter: Rattus
----
The XML Parser posted by "vankata at mikromaxbg dot com" on "28-Feb-2006 10:19"
requires the following fix:
Modify function "characterData($parser, $data)" as follows:
if(trim($data) != '')
{
if (!isset($stack[count($stack)-1]['data']))
$stack[count($stack)-1]['data'] = '';
$stack[count($stack)-1]['data'] .= $data;
}
This fixes the PHP Warning notices when "$stack[count($stack)-1]['data']" is not
yet set and fixes the bug that if "trim($data)" evaluates to "0" then the data
is not added.