Skip to content

Commit

Permalink
fix for function call with variables
Browse files Browse the repository at this point in the history
  • Loading branch information
voda committed Dec 16, 2010
1 parent e2ddd11 commit e849c56
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 0 additions & 1 deletion Filters/NetteLatteFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,6 @@ public function extract($file) {
);
foreach ($prefix as $position => $type) {
if (!isset($params[$position])) {
/** @todo print warning */
continue 2; // continue with next message
}
$result[$type] = $this->stripQuotes($this->fixEscaping($params[$position]));
Expand Down
7 changes: 5 additions & 2 deletions Filters/PHPFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,16 @@ public function extract($file) {
$iterator->next();
while ($iterator->valid()) {
$token = $iterator->current();
/** @todo check messages for variables ( 'foo'.$bar, "foo$bar") */
if ($token === '(') {
$position = 1;
} elseif ($token === ',') {
$position++;
} elseif ($token === ')') {
/** @todo check, that all parameters are set */
foreach ($definition as $type) {
if (!isset($message[$type])) {
continue 2;
}
}
$data[] = $message;
$iterator->next();
break;
Expand Down

0 comments on commit e849c56

Please sign in to comment.