mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
fix a bug for creating custom rules
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@8542 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
db14f45898
commit
13bf055f34
1 changed files with 1 additions and 1 deletions
|
|
@ -264,7 +264,7 @@ class Validator
|
||||||
return in_array($value, $rule['test']);
|
return in_array($value, $rule['test']);
|
||||||
case 'expr':
|
case 'expr':
|
||||||
if(!$rule['func_test']) {
|
if(!$rule['func_test']) {
|
||||||
$rule['func_test'] = create_function('$a', 'return ('.preg_replace('/$$/', '$a', $rule['test']).');');
|
$rule['func_test'] = create_function('$a', 'return ('.preg_replace('/\$\$/', '$a', $rule['test']).');');
|
||||||
}
|
}
|
||||||
return $rule['func_test']($value);
|
return $rule['func_test']($value);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue