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

b8 behavior to suppress initial errors during boot #1607

Open
luceos opened this Issue Oct 19, 2018 · 0 comments

Comments

Projects
None yet
2 participants
@luceos
Member

luceos commented Oct 19, 2018

Bug Report

Current Behavior

In case you have an extend, with an incorrect return value (in my case an empty file 🤷‍♂️), the error produced is something like this (from memory, but easy to reproduce with an extend.php in the root) "error on boot, reference in Arr class". This is caused by:

return array_flatten(require $extenderFile);

There are two issues here:

  • assuming the included file returns an array
  • erroring only with the message of the exception and no trace whatsoever to find the cause, not even with debug on..

Steps to Reproduce

  1. Install Flarum
  2. Create extend.php in your flarum root path.
  3. Open forum
  4. See error

Expected Behavior

No error, or a better error with debug enabled.

Environment

  • Flarum version: dev-master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment