Skip to content

Conversation

@xificurk
Copy link
Contributor

@xificurk xificurk commented Oct 4, 2018

  • bug fix
  • BC break? no
  • doc PR: not needed

Application::processException() in some cases uses presenter instance to create the forwarding request to Error presenter, see https://github.com/nette/application/blob/master/src/Application/Application.php#L159
The problem is that at this point we're not guaranteed that the presenter has intialized global state (namely Presenter::$globalParams might be null), e.g. the run() method was not yet called. This results in pretty confusing warning:

Warning: Invalid argument supplied for foreach() in /var/www/vendor/nette/application/src/Application/UI/Presenter.php:1143

The easiest fix is to set the default value for globalParams to empty array.

@xificurk xificurk force-pushed the fix-warning-on-forward branch from e9a6aef to d3de2a7 Compare October 4, 2018 11:09
@dg dg force-pushed the master branch 3 times, most recently from 68ab1de to 1dbc728 Compare October 25, 2018 18:26
@dg dg force-pushed the master branch 3 times, most recently from be77df6 to e1162e0 Compare November 23, 2018 16:01
@dg dg force-pushed the master branch 8 times, most recently from 10a5830 to e402814 Compare February 10, 2019 17:46
@dg dg force-pushed the master branch 3 times, most recently from 56c5e11 to 5919611 Compare February 13, 2019 00:53
@dg
Copy link
Member

dg commented Feb 13, 2019

Thanks!

@dg dg closed this in e76758f Feb 13, 2019
dg pushed a commit that referenced this pull request Feb 19, 2019
dg pushed a commit that referenced this pull request Mar 9, 2019
dg pushed a commit that referenced this pull request Mar 9, 2019
dg pushed a commit that referenced this pull request Mar 9, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants