Bug->Doc #50085 [Asn->Csd]: exception message does not allow hex 0
| From: | kalle@php.net | Date: | Sat, 23 Oct 2010 14:45:47 +0000 |
| Subject: | Bug->Doc #50085 [Asn->Csd]: exception message does not allow hex 0 | ||
| References: | 1 | Groups: | php.doc.bugs |
| Request: | Send a blank email to doc-bugs+get-5379@lists.php.net to get a copy of this message | ||
Edit report at http://bugs.php.net/bug.php?id=50085&edit=1
ID: 50085
Updated by: kalle@php.net
Reported by: andreas dot spreiter at gmx dot net
Summary: exception message does not allow hex 0
-Status: Assigned
+Status: Closed
-Type: Bug
+Type: Documentation Problem
-Package: Scripting Engine problem
+Package: Documentation problem
Operating System: *
PHP Version: 5.3.0
Assigned To: kalle
Block user comment: N
New Comment:
Re-classified as a documentation issue and fixed accordingly
Previous Comments:
------------------------------------------------------------------------
[2010-10-23 16:45:31] kalle@php.net
Automatic comment from SVN on behalf of kalle
Revision: http://svn.php.net/viewvc/?view=revision&revision=304663
Log: Fixed bug #50085 (exception message does not allow hex 0)
------------------------------------------------------------------------
[2009-11-05 14:36:10] kalle@php.net
Assigned to self, below patch fixes the problem:
http://www.pastie.org/684799
------------------------------------------------------------------------
[2009-11-05 01:20:31] andreas dot spreiter at gmx dot net
Description:
------------
it seems that the exception message must not contain the hex 0 character
like "\x00" i.e. message is truncated at first occurence of hex 0
Reproduce code:
---------------
try {
$msg = "Some error \x13 \x01 \xff \x00 message";
throw new Exception($msg);
} catch(Exception $e) {
echo '<pre>';
echo $e->getMessage()."\n";
echo $msg;
echo '</pre>';
}
Expected result:
----------------
Some error ÿ � message
Some error ÿ � message
Actual result:
--------------
Some error ÿ
Some error ÿ � message
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=50085&edit=1