Fixed checkRequirements does not validate $warning/$error are arrays

Xon

Well-known member
Affected version
2.2.8 Patch 1
AbstractSetup::checkRequirements has the signature public function checkRequirements(&$errors = [], &$warnings = [])

However, nothing actually checks that $errors and $warnings remain arrays which can result in the not very useful error message;

Code:
In AddOnActionTrait.php line 73:

  [ErrorException]
  [E_WARNING] foreach() argument must be of type array|object, string given
 

XF Bug Bot

XenForo bug fixer bot
Staff member
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.9).

Change log:
Throw an exception when add-on requirement errors or warnings are not arrays
There may be a delay before changes are rolled out to the XenForo Community.
 
Top