|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #70894 Null bytes in exception messages truncate them on string cast
Submitted: 2015-11-11 17:08 UTC Modified: 2015-11-12 09:01 UTC
From: me at kelunik dot com Assigned:
Status: Open Package: Scripting Engine problem
PHP Version: ANY OS: any
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
33 - 24 = ?
Subscribe to this entry?

 [2015-11-11 17:08 UTC] me at kelunik dot com
Null bytes in exception messages truncate the messages when the exception is casted to a string.

Affects also older versions of PHP.

Test script:

Expected result:
string(52) "Exception:  bar foo in /in/JldYh:3
Stack trace:
#0 {main}foo"

Actual result:
string(52) "Exception:  in /in/JldYh:3
Stack trace:
#0 {main}foo"


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2015-11-12 09:01 UTC]
-PHP Version: 7.0.0RC6 +PHP Version: ANY
 [2021-02-11 15:08 UTC]
Related To: Bug #61804
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Thu Sep 29 21:05:53 2022 UTC