EcomDev_PHPUnit
EcomDev_PHPUnit copied to clipboard
Notice: Undefined offset: 2
Notice: Undefined offset: 2 in /lib/EcomDev/PHPUnit/Constraint/Controller/Request.php on line 86
The above happens when parsing route of type 'module/action'. When route is exploded it has 2 fields, code on line 86 tries to pad the array, but uses array_pad in wrong way, it should be:
$routeParts = array_pad($routeParts, 3, null);
and not
array_pad($routeParts, 3-$routePartsCount, null);
PHP v.5.3.15 From manual: array_pad() returns a copy of the input padded to size specified by pad_size with value pad_value.