Bug #66843 [Opn->Fbk]: set_error_handler message is cut
| From: | ab@php.net | Date: | Tue, 11 Mar 2014 10:13:12 +0000 |
| Subject: | Bug #66843 [Opn->Fbk]: set_error_handler message is cut | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-184715@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=66843&edit=1
ID: 66843
Updated by: ab@php.net
Reported by: php at maisqi dot com
Summary: set_error_handler message is cut
-Status: Open
+Status: Feedback
Type: Bug
Package: *General Issues
Operating System: Windows and Linux
PHP Version: 5.5.10
Block user comment: N
Private report: N
New Comment:
Under Apache you should check if there's something in the error_log, sometimes that output will
go to stderr so it'll be seen in the error logs only. Whereby what you show is probably not the
case.
I assume the issue you've got is laying in the usage of htmlspecialchars. Please check your
error messages are in the right charset.
Thanks.
Previous Comments:
------------------------------------------------------------------------
[2014-03-07 12:41:49] php at maisqi dot com
Test script in http://maisqi.com/outros/bugs/php/66843, running
on a Linux server.
------------------------------------------------------------------------
[2014-03-07 12:39:38] php at maisqi dot com
Description:
------------
The message passed to the function registered with set_error_handler is sometimes cut. I tested the
error reporting with or without set_error_handler() and the message is incomplete on the latter.
Test script:
---------------
<pre>
<?php
ini_set ('display_errors', '1');
echo "<h2>With no set_error_handler()</h2>\n";
test ();
echo "<h2>With the set_error_handler() setup</h2>\n";
set_error_handler (function ($code, $message) { echo '== ', htmlspecialchars
($message); });
test ();
echo "\n\n\n\nDone";
function test ($a) {}
Expected result:
----------------
It should be output the exact same message two times.
Actual result:
--------------
The first message (with no set_error_handler() is ok; the second is trimmed after
"defined".
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=66843&edit=1