Bug #66843 [Nab]: set_error_handler message is cut

From: Date: Fri, 28 Mar 2014 20:16:12 +0000
Subject: Bug #66843 [Nab]: set_error_handler message is cut
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-184953@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
 User updated by:    php at maisqi dot com
 Reported by:        php at maisqi dot com
 Summary:            set_error_handler message is cut
 Status:             Not a bug
 Type:               Bug
 Package:            *General Issues
 Operating System:   Windows and Linux
 PHP Version:        5.5.10
 Block user comment: N
 Private report:     N

 New Comment:

Hello, requinix@php.net.
That's is a very strange thing to do, IMO, but I'm not going to waste anyone's time
in such a minor detail. Closing this issue in my mind. Thanks.


Previous Comments:
------------------------------------------------------------------------
[2014-03-26 21:33:14] requinix@php.net

"Missing argument 1 for test(), called in /home/maisqic/public_html/outros/bugs/php/66843.php
on line 13 and defined" IS the complete $message - the "in <file> on line
<line>" is added by the built-in error handlers automatically. Your custom handler is not
doing that.

Use the code @ab posted and you'll get the output you're expecting.

------------------------------------------------------------------------
[2014-03-26 20:20:05] php at maisqi dot com

I'm using PHP 5.5.10. Check the script again; it's printing the PHP_VERSION now.

------------------------------------------------------------------------
[2014-03-26 08:23:30] ab@php.net

Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.

Please use the full parameter list of the error handler function, that way you can compose the error
message.

set_error_handler (function ($code, $message, $file, $line) {	echo '== ', $message, '
in ', $file, ' on line ', $line;	});

------------------------------------------------------------------------
[2014-03-25 19:53:49] php at maisqi dot com

I tested it now without htmlspecialchars() and the problem remains. Check the file for yourself; it
outputs the source code now.
Thanks.

------------------------------------------------------------------------
[2014-03-25 14:25:32] ab@php.net

But have you tried to remove the htmlspecialchars() call?

Thanks.

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


The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at

    https://bugs.php.net/bug.php?id=66843


-- 
Edit this bug report at https://bugs.php.net/bug.php?id=66843&edit=1


Thread (10 messages)

« previous php.bugs (#184953) next »