Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error handler callback #6724

Merged

Conversation

paulbalandan
Copy link
Member

Description
The callback to set_error_handler expects to return a bool:
https://www.php.net/manual/en/function.set-error-handler.php

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@kenjis
Copy link
Member

kenjis commented Oct 20, 2022

Interesting.
It seems the sample code was fixed in English manual.
See https://www.php.net/manual/ja/function.set-error-handler.php#refsect1-function.set-error-handler-examples

system/Debug/Exceptions.php Outdated Show resolved Hide resolved
@kenjis kenjis added bug Verified issues on the current code behavior or pull requests that will fix them docs needed Pull requests needing documentation write-ups and/or revisions. labels Oct 22, 2022
@kenjis
Copy link
Member

kenjis commented Oct 22, 2022

@paulbalandan Doesn't this change the behavior when ! (error_reporting() & $severity)?
I think it is not a breaking change, but isn't it better to add the changelog?

@paulbalandan paulbalandan removed the docs needed Pull requests needing documentation write-ups and/or revisions. label Oct 23, 2022
@paulbalandan paulbalandan merged commit 020af6d into codeigniter4:develop Oct 23, 2022
@paulbalandan paulbalandan deleted the fix-error-handler-callback branch October 23, 2022 12:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants