cvs: smarty /libs/plugins function.html_checkboxes.php function.html_radios.php

"Messju Mohr" <[email protected]>
Newsgroups gmane.comp.php.cvs.smarty
Message-ID <cvsmessju1100592323@cvsserver>
messju		Tue Nov 16 03:05:23 2004 EDT

  Modified files:              
    /smarty/libs/plugins	function.html_checkboxes.php 
                        	function.html_radios.php 
  Log:
  cleaned up typecasting
  
  
http://cvs.php.net/diff.php/smarty/libs/plugins/function.html_checkboxes.php?r1=1.17&r2=1.18&ty=u
Index: smarty/libs/plugins/function.html_checkboxes.php
diff -u smarty/libs/plugins/function.html_checkboxes.php:1.17 smarty/libs/plugins/function.html_checkboxes.php:1.18
--- smarty/libs/plugins/function.html_checkboxes.php:1.17	Fri Jul 23 11:42:41 2004
+++ smarty/libs/plugins/function.html_checkboxes.php	Tue Nov 16 03:05:21 2004
@@ -101,7 +101,7 @@
     settype($selected, 'array');
     $_html_result = array();
 
-    if (is_array($options)) {
+    if (isset($options)) {
 
         foreach ($options as $_key=>$_val)
             $_html_result[] = smarty_function_html_checkboxes_output($name, $_key, $_val, $selected, $extra, $separator, $labels);
http://cvs.php.net/diff.php/smarty/libs/plugins/function.html_radios.php?r1=1.20&r2=1.21&ty=u
Index: smarty/libs/plugins/function.html_radios.php
diff -u smarty/libs/plugins/function.html_radios.php:1.20 smarty/libs/plugins/function.html_radios.php:1.21
--- smarty/libs/plugins/function.html_radios.php:1.20	Fri Jul 23 11:42:41 2004
+++ smarty/libs/plugins/function.html_radios.php	Tue Nov 16 03:05:21 2004
@@ -103,14 +103,14 @@
 
     $_html_result = array();
 
-    if (isset($options) && is_array($options)) {
+    if (isset($options))) {
 
-        foreach ((array)$options as $_key=>$_val)
+        foreach ($options as $_key=>$_val)
             $_html_result[] = smarty_function_html_radios_output($name, $_key, $_val, $selected, $extra, $separator, $labels);
 
     } else {
 
-        foreach ((array)$values as $_i=>$_key) {
+        foreach ($values as $_i=>$_key) {
             $_val = isset($output[$_i]) ? $output[$_i] : '';
             $_html_result[] = smarty_function_html_radios_output($name, $_key, $_val, $selected, $extra, $separator, $labels);
         }

-- 
Smarty CVS Mailing List (http://cvs.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.