removed two notices from Smarty_Compiler::_parse_is_expr()

(thanks shuther!)
This commit is contained in:
messju
2004-02-07 20:55:27 +00:00
parent ef24ac0a3f
commit 7703839dbb

View File

@@ -1433,7 +1433,7 @@ class Smarty_Compiler extends Smarty {
switch ($expr_type) {
case 'even':
if (@$tokens[$expr_end] == 'by') {
if (isset($tokens[$expr_end]) && $tokens[$expr_end] == 'by') {
$expr_end++;
$expr_arg = $tokens[$expr_end++];
$expr = "!(1 & ($is_arg / " . $this->_parse_var_props($expr_arg) . "))";
@@ -1442,7 +1442,7 @@ class Smarty_Compiler extends Smarty {
break;
case 'odd':
if (@$tokens[$expr_end] == 'by') {
if (isset($tokens[$expr_end]) && $tokens[$expr_end] == 'by') {
$expr_end++;
$expr_arg = $tokens[$expr_end++];
$expr = "(1 & ($is_arg / " . $this->_parse_var_props($expr_arg) . "))";