[RSS Feed/News] Controller::errorException ergonomics

Status
Not open for further replies.

XenForo

Administrative
  • Thread starter
  • Admin
  • #1
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

ادامه مطلب...
 
Status
Not open for further replies.
Back
Top Bottom