ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> php-dev
php-dev
#50085 [Opn->Asn]: exception message does not allow hex 0
by kalle other posts by this author
Nov 5 2009 6:36AM messages near this date
#50085 [NEW]: exception message does not allow hex 0 | #50084 [NEW]: Support a.m. and p.m. (with periods)
ID:               50085
 Updated by:       kalle@[...].net
 Reported By:      andreas dot spreiter at gmx dot net
-Status:           Open
+Status:           Assigned
-Bug Type:         SPL related
+Bug Type:         Scripting Engine problem
-Operating System: Windows XP
+Operating System: *
 PHP Version:      5.3.0
-Assigned To:      
+Assigned To:      kalle
 New Comment:

Assigned to self, below patch fixes the problem:
http://www.pastie.org/684799


Previous Comments:
------------------------------------------------------------------------

[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   � &#65533; message
Some error   � &#65533; message

Actual result:
--------------
Some error   � 
Some error   � &#65533; message


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=50085&edit=1
Thread:
Andreas Dot Spreiter At Gmx Dot Net
kalle

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved