cvs: smarty /libs/plugins function.html_options.php

"Messju Mohr" <[email protected]>
Newsgroups gmane.comp.php.cvs.smarty
Message-ID <cvsmessju1100523841@cvsserver>
messju		Mon Nov 15 08:04:02 2004 EDT

  Modified files:              
    /smarty/libs/plugins	function.html_options.php 
  Log:
  fixed semantically misleading check for $options (use isset() instead
  of is_array() because it is always an array).
  
  thanks to albert almeida.
  
  
  
http://cvs.php.net/diff.php/smarty/libs/plugins/function.html_options.php?r1=1.23&r2=1.24&ty=u
Index: smarty/libs/plugins/function.html_options.php
diff -u smarty/libs/plugins/function.html_options.php:1.23 smarty/libs/plugins/function.html_options.php:1.24
--- smarty/libs/plugins/function.html_options.php:1.23	Fri Jul 23 11:34:53 2004
+++ smarty/libs/plugins/function.html_options.php	Mon Nov 15 08:03:57 2004
@@ -72,14 +72,14 @@
 
     $_html_result = '';
 
-    if (is_array($options)) {
+    if (isset($options)) {
         
         foreach ($options as $_key=>$_val)
             $_html_result .= smarty_function_html_options_optoutput($_key, $_val, $selected);
 
     } else {
         
-        foreach ((array)$values as $_i=>$_key) {
+        foreach ($values as $_i=>$_key) {
             $_val = isset($output[$_i]) ? $output[$_i] : '';
             $_html_result .= smarty_function_html_options_optoutput($_key, $_val, $selected);
         }

-- 
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.