Fixed Bug / Questionable code in the XFES plugin XF 2.1

polyp2000

New member
Affected version
2.1
In the following file :

../addons/XFES/Service/Optimizer.php

theres a check on line 38 that fails

if(!$config['mappings'])
{
return true;
}

If "mappings" is not in the $config array, it will throw an "Undefined Index" error

I've fixed this on my copy by changing it to :-

if(!isset($config['mappings']) || !$config['mappings'])
{
return true;
}

I cant imagine there are any implications to this but i thought i would let you know
so that i dont have to maintain my own patched build. Please could you patch the official XFES distrubution

Many Thanks

N
 
Thank you for reporting this issue. It has now been resolved and we are aiming to include it in a future XFES release (2.1.1).

Change log:
Prevent a PHP notice when checking for an optimizable index if no "mappings" entry is returned
Any changes made as a result of this issue being resolved may not be rolled out here until later.
 
Back
Top Bottom