From 00ccae885723520147ae79549b95af9ef11ada98 Mon Sep 17 00:00:00 2001 From: "Uwe.Tews@googlemail.com" Date: Sun, 14 Jul 2013 22:15:45 +0000 Subject: - update for PHP 5.4 compatibility - reformat source to PSR-2 standard --- libs/plugins/function.html_table.php | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'libs/plugins/function.html_table.php') 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 -- cgit v1.3