Skip to content

Commit

Permalink
Fixes bug #48
Browse files Browse the repository at this point in the history
  - Removed debugging Exception that is thrown if template variables
    loops over an empty array or null (see example/i18n/index.php for
    testing).
  - Cleaned up trailing spaces (and CRLF) of committing files.
  - Added smart to make i18n example work out of the box on Linux
    machines as well.
  • Loading branch information
Bruno Braga committed Jun 27, 2013
1 parent ce703b1 commit 16f5f07
Show file tree
Hide file tree
Showing 2 changed files with 491 additions and 493 deletions.
11 changes: 8 additions & 3 deletions example/i18n/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
'i18n' => array(
'locale' => isset($_GET['lang']) ? $_GET['lang'] : false,
'charset' => 'UTF-8',
'gettext_path' => '../bin/gettext/bin/',
'gettext_path' => (strtoupper(PHP_OS) == 'LINUX' ? '/usr/bin/' : '../bin/gettext/bin/'),
'extract_message' => true,
'compile_message' => true,
)
Expand All @@ -16,7 +16,7 @@


$time_start = microtime(true);

echo $template->render(array(
'users' => array(
array(
Expand All @@ -38,9 +38,14 @@
'username' => 'foobar',
'tasks' => array(),
'user_id' => 4
),
array(
'username' => 'test',
'tasks' => null,
'user_id' => 5
)
)
));
echo "in ".(microtime(true) - $time_start)." seconds\n<br/>";

?>
?>
Loading

0 comments on commit 16f5f07

Please sign in to comment.