Bug #66843 [NEW]: set_error_handler message is cut

From: Date: Fri, 07 Mar 2014 12:39:39 +0000
Subject: Bug #66843 [NEW]: set_error_handler message is cut
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-184600@lists.php.net to get a copy of this message
From:             php at maisqi dot com
Operating system: Windows and Linux
PHP version:      5.5.10
Package:          *General Issues
Bug Type:         Bug
Bug description:set_error_handler message is cut

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 bug report at https://bugs.php.net/bug.php?id=66843&edit=1
-- 
Try a snapshot (PHP 5.4):   https://bugs.php.net/fix.php?id=66843&r=trysnapshot54
Try a snapshot (PHP 5.5):   https://bugs.php.net/fix.php?id=66843&r=trysnapshot55
Try a snapshot (trunk):     https://bugs.php.net/fix.php?id=66843&r=trysnapshottrunk
Fixed in SVN:               https://bugs.php.net/fix.php?id=66843&r=fixed
Fixed in release:           https://bugs.php.net/fix.php?id=66843&r=alreadyfixed
Need backtrace:             https://bugs.php.net/fix.php?id=66843&r=needtrace
Need Reproduce Script:      https://bugs.php.net/fix.php?id=66843&r=needscript
Try newer version:          https://bugs.php.net/fix.php?id=66843&r=oldversion
Not developer issue:        https://bugs.php.net/fix.php?id=66843&r=support
Expected behavior:          https://bugs.php.net/fix.php?id=66843&r=notwrong
Not enough info:            https://bugs.php.net/fix.php?id=66843&r=notenoughinfo
Submitted twice:            https://bugs.php.net/fix.php?id=66843&r=submittedtwice
register_globals:           https://bugs.php.net/fix.php?id=66843&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=66843&r=php4
Daylight Savings:           https://bugs.php.net/fix.php?id=66843&r=dst
IIS Stability:              https://bugs.php.net/fix.php?id=66843&r=isapi
Install GNU Sed:            https://bugs.php.net/fix.php?id=66843&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=66843&r=float
No Zend Extensions:         https://bugs.php.net/fix.php?id=66843&r=nozend
MySQL Configuration Error:  https://bugs.php.net/fix.php?id=66843&r=mysqlcfg



Thread (10 messages)

« previous php.bugs (#184600) next »