Solved Controller::errorException ergonomics

This topic has been solved
X

Xon

Guest
If code (incorrectly) does this:
Code:

throw $this->errorException($this->noPermission())
errorException has no type hints to indicate It's type signature is actually string|string[]|Stringable|Stringable[], so passing it the result of noPermission doesn't cause any errors or hints that it has the wrong type.

Instead the XF error page will throw "Object of class XF\Mvc\Reply\View could not be converted to string", converting what was a user facing error message into a...

Read more

Continue reading...