diff options
| author | Uwe.Tews@googlemail.com <Uwe.Tews@googlemail.com> | 2013-07-14 22:15:45 +0000 |
|---|---|---|
| committer | Uwe.Tews@googlemail.com <Uwe.Tews@googlemail.com> | 2013-07-14 22:15:45 +0000 |
| commit | 00ccae885723520147ae79549b95af9ef11ada98 (patch) | |
| tree | 0c38839e432d0c1403548cec1fdcb3a01df94c2e /libs/plugins/function.html_table.php | |
| parent | f99e6a83ce734c089965a76941994e21f77b36da (diff) | |
| download | smarty-00ccae885723520147ae79549b95af9ef11ada98.tar.gz smarty-00ccae885723520147ae79549b95af9ef11ada98.tar.bz2 smarty-00ccae885723520147ae79549b95af9ef11ada98.zip | |
- update for PHP 5.4 compatibility
- reformat source to PSR-2 standard
Diffstat (limited to 'libs/plugins/function.html_table.php')
| -rw-r--r-- | libs/plugins/function.html_table.php | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/libs/plugins/function.html_table.php b/libs/plugins/function.html_table.php index 6b9cb9d1..275f6c24 100644 --- a/libs/plugins/function.html_table.php +++ b/libs/plugins/function.html_table.php @@ -64,13 +64,14 @@ function smarty_function_html_table($params, $template) if (!isset($params['loop'])) { trigger_error("html_table: missing 'loop' parameter",E_USER_WARNING); + return; } foreach ($params as $_key => $_value) { switch ($_key) { case 'loop': - $$_key = (array)$_value; + $$_key = (array) $_value; break; case 'cols': @@ -81,14 +82,14 @@ function smarty_function_html_table($params, $template) $cols = explode(',', $_value); $cols_count = count($cols); } elseif (!empty($_value)) { - $cols_count = (int)$_value; + $cols_count = (int) $_value; } else { $cols_count = $cols; } break; case 'rows': - $$_key = (int)$_value; + $$_key = (int) $_value; break; case 'table_attr': @@ -97,7 +98,7 @@ function smarty_function_html_table($params, $template) case 'vdir': case 'inner': case 'caption': - $$_key = (string)$_value; + $$_key = (string) $_value; break; case 'tr_attr': @@ -173,5 +174,3 @@ function smarty_function_html_table_cycle($name, $var, $no) return ($ret) ? ' ' . $ret : ''; } - -?>
\ No newline at end of file |
