Skip to content
Snippets Groups Projects
Commit 5f892a1b authored by Jared Hancock's avatar Jared Hancock
Browse files

i18n: Fix crash building language packs

parent 1f7c7f47
No related branches found
No related tags found
No related merge requests found
......@@ -581,10 +581,11 @@ class i18n_Compiler extends Module {
$s = str_replace($root, '', $s);
$this->stderr->write($s."\n");
$calls = array();
preg_match_all('/__\(\s*[^\'"]*(([\'"])(?:(?<!\\\\)\2|.)+\2)\s*[^)]*\)/',
preg_match_all('/(?:function\s+)?__\(\s*[^\'"]*(([\'"])(?:(?<!\\\\)\2|.)+\2)\s*[^)]*\)/',
$script, $calls, PREG_OFFSET_CAPTURE | PREG_SET_ORDER);
foreach ($calls as $c) {
$call = $this->__find_strings(token_get_all('<?php '.$c[0][0]), $funcs, 0);
if (!($call = $this->__find_strings(token_get_all('<?php '.$c[0][0]), $funcs, 0)))
continue;
$call = $call[0];
list($lhs) = str_split($script, $c[1][1]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment