Fixing bug that occurred with no required parameters

This commit is contained in:
Nathan Adams 2014-05-06 19:02:50 -05:00
parent 9eca035c3f
commit b555ea983c

View File

@ -169,7 +169,7 @@ class HF_Core
$numOfReqPara = $call->getNumberOfRequiredParameters();
$numOfOptPara = $call->getNumberOfParameters() - $numOfReqPara;
$remainparas = count($this->args) - $numOfReqPara;
if ($remainparas >= 0 && $remainparas <= $numOfOptPara)
if ($numOfReqPara == 0 || ($remainparas >= 0 && $remainparas <= $numOfOptPara))
{
$call->invokeArgs($this->class, $this->args);
}