bugfree-dangerzone
bugfree-dangerzone copied to clipboard
Calling variable methods will crash the validator
We have some methods such as below to help us test our code.
/**
* @param string $method
* @param mixed $parameter
* @return mixed
* @codeCoverageIgnore
*/
protected function _callParent ($method, $parameter)
{
return parent::$method($parameter);
}
This crashes the validator with an exception:
:1 Exception while parsing application/classes/payment/specifications/ideal.php ErrorException("ReflectionClass::getMethod() expects parameter 1 to be string, object given")
The call to the variable should be ignored, or the validator should attempt to resolve the variable.