note 65470 added to ref.xml
| From: | php dot notes at stoecklin dot net | Date: | Mon, 01 May 2006 17:15:57 +0000 |
| Subject: | note 65470 added to ref.xml | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-110276@lists.php.net to get a copy of this message | ||
I realized that there is a tiny flaw at line 4 in James' update of Felix' code. The
double backslash will add backslashes to the charlist an not tabs, new lines, carriage returns,
NULL-bytes, and vertical tabs respectively. The rest of the code has been reproduced as is:
<?php
function dataHandler($parser, $data) {
//Trims everything except for spaces
if($data = trim($data, "\t\n\r\0\x0B")) {
$index = count($this->data) - 1;
if(isset($this->data[$index]['content'])) {
$this->data[$index]['content'] .= $data;
}
else $this->data[$index]['content'] = $data;
}
}
?>
----
Server IP: 212.124.37.9
Probable Submitter: 85.218.28.192
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/ref.xml.php
Edit -- http://master.php.net/note/edit/65470
Del: integrated -- http://master.php.net/note/delete/65470/integrated
Del: useless -- http://master.php.net/note/delete/65470/useless
Del: bad code -- http://master.php.net/note/delete/65470/bad+code
Del: spam -- http://master.php.net/note/delete/65470/spam
Del: non-english -- http://master.php.net/note/delete/65470/non-english
Del: in docs -- http://master.php.net/note/delete/65470/in+docs
Del: other reasons-- http://master.php.net/note/delete/65470
Reject -- http://master.php.net/note/reject/65470
Search -- http://master.php.net/manage/user-notes.php