|
@@ 107-109 (lines=3) @@
|
| 104 |
|
} |
| 105 |
|
$name = $params['name']; |
| 106 |
|
|
| 107 |
|
if (substr($val, 0, 1) !== '"' && substr($val, 0, 1) !== '\'') { |
| 108 |
|
throw new CompilationException($compiler, 'Foreach <em>item</em> parameter must be of type string'); |
| 109 |
|
} |
| 110 |
|
if (isset($key) && substr($val, 0, 1) !== '"' && substr($val, 0, 1) !== '\'') { |
| 111 |
|
throw new CompilationException($compiler, 'Foreach <em>key</em> parameter must be of type string'); |
| 112 |
|
} |
|
@@ 110-112 (lines=3) @@
|
| 107 |
|
if (substr($val, 0, 1) !== '"' && substr($val, 0, 1) !== '\'') { |
| 108 |
|
throw new CompilationException($compiler, 'Foreach <em>item</em> parameter must be of type string'); |
| 109 |
|
} |
| 110 |
|
if (isset($key) && substr($val, 0, 1) !== '"' && substr($val, 0, 1) !== '\'') { |
| 111 |
|
throw new CompilationException($compiler, 'Foreach <em>key</em> parameter must be of type string'); |
| 112 |
|
} |
| 113 |
|
|
| 114 |
|
// evaluates which global variables have to be computed |
| 115 |
|
$varName = '$dwoo.foreach.' . trim($name, '"\'') . '.'; |