Closed chuv1 closed 7 years ago
Correct thing in this situation is to replace %
with %%
to escape the percent sign 👍
So this is my fault, no? I just turned logging on in hook...
D'oh, didn't read the error properly, thought that you were using vsprintf
, just noticed it's the logger...
No, it's not your fault, it's mine. Didn't test for that case...
Will fix it for the next release 👍 Thanks for letting us know!
As I'm fixing this, I wonder why you got this error message, as it should get suppressed by the @
here.
You do have it there, right?
Yes, I have it. Could be because of this?
ini_set( "display_errors", "off" );
error_reporting( E_ALL );
from this comment
I don't think so.
Have tried to add that myself and it still gets suppressed, weird.
Fix incoming... 😇
No, found out that it's my fault -
If you have set a custom error handler function with set_error_handler() then it will still get called, but this custom error handler can (and should) call error_reporting() which will return 0 when the call that triggered the error was preceded by an @. from php.net
Ok, PR is open here #414
Could you try to add the code to your bot and see if it's fixed now?
If yes, I'll merge and then release 0.40.0
Yes, works fine with that fix. Custom handler not triggered anymore.
No, found out that it's my fault
Not at all! You may have triggered the bug, but it was my bad 😉
Keep breaking stuff!! 👍
Ok, I will. ))))) Thanks for your work guys!
I finished with my own crash notifier, based on this comment and curl request to api endpoint in case of errors. It notifies me by bot itself about Exceptions in code.
So it started to notify my about
when message text contains percent sign. Incoming message example (cleaned for privacy):
and another one
PS. I'm using 0.39 version.