Add default parameter value

This commit is contained in:
Michal Čihař 2011-08-11 14:31:44 +02:00
parent 3a034bd539
commit 249e7f99a2

View File

@ -133,7 +133,7 @@ class Advisor
// Runs a code expression, replacing variable names with their respective values
// ignoreUntil: if > 0, it doesn't replace any variables until that string position, but still evaluates the whole expr
function ruleExprEvaluate($expr, $ignoreUntil) {
function ruleExprEvaluate($expr, $ignoreUntil = 0) {
if($ignoreUntil > 0) {
$exprIgnore = substr($expr,0,$ignoreUntil);
$expr = substr($expr,$ignoreUntil);