Hi Thomas,
On Thu, Jan 29, 2015 at 4:55 PM, Thomas Bley wrote:
> I think you mean:
> function myErrorHandler( int $errno , string $errstr [, string $errfile [,
> int $errline [, array $errcontext [, string &$extra_errstr )
>
Yes.
>
> We have these empty-call-filled-on-return parameters i
I think you mean:
function myErrorHandler( int $errno , string $errstr [, string $errfile [, int
$errline [, array $errcontext [, string &$extra_errstr )
We have these empty-call-filled-on-return parameters in preg_match(...$match)
but I am not sure if it makes things more complicated than
> User defined error handler is for error handling customization, letting
> user
> customize message makes sense.
This is exactly our case.
> Thomas,
> If there are many people concerns to change error message, how about
> append user error message to original error message when it's changed?
> I
Hi Andrea,
On Thu, Jan 29, 2015 at 2:38 AM, Andrea Faulds wrote:
> Error handlers are global anyway, so this is useless (or dangerous) for
> libraries.
I suggest library/framework developers *not* to use user defined error
handler.
It's better to leave error handler for application developers.
Hi Thomas,
On Thu, Jan 29, 2015 at 11:51 AM, Yasuo Ohgaki wrote:
> If there are many people concerns to change error message, how about
> append user error message to original error message when it's changed?
>
How about this signature.
function myErrorHandler($errno, $errstr, $errfile, $errli
>> Error handlers are global anyway, so this is useless (or dangerous) for
>> libraries.
I'm not sure if there is a library that parses php errors and is not able to
handle prefixes or suffixes.
I'm using a similar workaround for many years now in code bases with 500k+
lines of code and it was n
> Error handlers are global anyway, so this is useless (or dangerous) for
> libraries.
Yes that's true, maybe set_error_handler can be changed so it behaves like
register_shutdown_function or spl_autoload_register when multiple callbacks are
registered?
Regards
Thomas
Andrea Faulds wrote on 2
Hi Thomas,
> On 28 Jan 2015, at 17:36, Thomas Bley wrote:
>
> the idea behind the rfc is not to change error messages, it's only to append
> useful information to them.
That’s still changing the message.
Error handlers are global anyway, so this is useless (or dangerous) for
libraries.
I do
Hi,
the idea behind the rfc is not to change error messages, it's only to append
useful information to them.
Regards
Thomas
Andrea Faulds wrote on 28.01.2015 17:53:
> Hi Thomas,
>
>> On 27 Jan 2015, at 02:45, Thomas Bley wrote:
>>
>> Here is the rfc:
>> https://wiki.php.net/rfc/error_handle
Hi Thomas,
> On 27 Jan 2015, at 02:45, Thomas Bley wrote:
>
> Here is the rfc:
> https://wiki.php.net/rfc/error_handler_callback_parameters_passed_by_reference
>
> Thanks to reeze for coding and putting it on the wiki.
>
> Regards
> Thomas
This feels rather weird and “hacky” to me. Error hand
Hi Xinchen,
On Wed, Jan 28, 2015 at 3:15 PM, Xinchen Hui wrote:
> actually, this should already be in access.log(the last 500 error
> one).. I don't see why you need it in error log
>
PHP log would be more useful with user ID/name to identify
who was trying to tamper with system, for e
>> Request-Uri: /custom/foobar
>> Request-Params: {"action":"edit"}
> actually, this should already be in access.log(the last 500 error
> one).. I don't see why you need it in error log
Sorry, my example is not precise enough. Normally, $_POST,
$_SESSION['username'] and php://input a
On Wed, Jan 28, 2015 at 2:11 PM, Thomas Bley wrote:
> There are some workarounds with register_shutdown_function to extend E_ERROR
> messages, but I think that's quite dirty in a system with many parallel
> requests.
> Here is an example:
>
> ini_set('error_reporting', E_ALL);
> ini_set('displa
There are some workarounds with register_shutdown_function to extend E_ERROR
messages, but I think that's quite dirty in a system with many parallel
requests.
Here is an example:
'edit');
function check_for_fatal() {
$error = error_get_last();
if ($error['type'] == E_ERROR) {
$errstr =
Hi,
the idea behind the rfc is not to change error messages, it's only to append
useful information to them.
Changing lines/filenames is surely something controversial and might be only
useful when compiling configuration files or templates to php code. Therefore
we have 3 options in the voting
Hi!
> I feel it's kindof wrong direction.
>
> if you want custom logs, maybe you should use custom logger.
Same here, API basing on modifying something that is supposed to be
internal engine things feels wrong, even if it does work. Changing error
message is borderline, changing things like line
Hi all,
On Wed, Jan 28, 2015 at 3:09 AM, Yasuo Ohgaki wrote:
> On Tue, Jan 27, 2015 at 9:26 PM, Xinchen Hui wrote:
>
>> if you want custom logs, maybe you should use custom logger.
>
>
> It requires to catch all errors, I suppose. If PHP allows it, either would
> work.
I considered a little m
Hi Xinhcen,
On Tue, Jan 27, 2015 at 9:26 PM, Xinchen Hui wrote:
> if you want custom logs, maybe you should use custom logger.
It requires to catch all errors, I suppose. If PHP allows it, either would
work.
Regards,
--
Yasuo Ohgaki
yohg...@ohgaki.net
Hey:
On Tue, Jan 27, 2015 at 11:08 AM, Yasuo Ohgaki wrote:
> Hi Thomas,
>
> On Tue, Jan 27, 2015 at 11:45 AM, Thomas Bley wrote:
>
>> Here is the rfc:
>>
>> https://wiki.php.net/rfc/error_handler_callback_parameters_passed_by_reference
>>
>> Thanks to reeze for coding and putting it on the wiki.
Hi Thomas,
On Tue, Jan 27, 2015 at 11:45 AM, Thomas Bley wrote:
> Here is the rfc:
>
> https://wiki.php.net/rfc/error_handler_callback_parameters_passed_by_reference
>
> Thanks to reeze for coding and putting it on the wiki.
>
It looks good to me.
Future Scope
set_error_handler() callback migh
Here is the rfc:
https://wiki.php.net/rfc/error_handler_callback_parameters_passed_by_reference
Thanks to reeze for coding and putting it on the wiki.
Regards
Thomas
reeze wrote on 23.01.2015 10:59:
> Yeah, seem other want it it too, so I just updated the PR to allow the first
> four paramete
21 matches
Mail list logo