Duplicate Add-on commands does not work anymore in XF2.2

TnT

Member
Affected version
2.2 Beta 2
In method XF\Cli\Runner::getAddOnForCommand you get something like Vendor\Addon.
In method XF::isAddOnActive you compare it against a list of addons which includes Vendor/Addon, which fails (backslash vs. forward slash).

Suggested (and tested) fix:

Replace in XF\Cli\Runner::getAddOnForCommand at line 150 with:

PHP:
return str_replace('\\', '/', $addOn);
 
Top Bottom