do not pass null to object methods

[email protected] (Arpad Borsos) Mon, 27 Jun 2005 17:26:13 +0200
Newsgroups php.smarty.dev
Message-ID <[email protected]>
when i do not enter any arguments, smarty passes null as argument, which 
breaks my method's default argument values.
eg.
function foobar($foo = 'defaultvalue')
doesnt work anymore. This is a small patch to stop smarty from passing 
null as argument.

-- 
________________________________
MfG Arpad Borsos aka "Swatinem"
http://localhost.renegade-planet.de
________________________________
Reclaim Your Inbox! - Mozilla Thunderbird
http://www.mozilla.org/products/thunderbird/

Take Back the Web! - Mozilla Firefox
http://www.mozilla.org/products/firefox/
________________________________
Smarty_Compiler.class.php.patch (text/plain, 594 B)
Index: Smarty_Compiler.class.php
===================================================================
RCS file: /repository/smarty/libs/Smarty_Compiler.class.php,v
retrieving revision 1.369
diff -u -r1.369 Smarty_Compiler.class.php
--- Smarty_Compiler.class.php	2 May 2005 14:03:18 -0000	1.369
+++ Smarty_Compiler.class.php	27 Jun 2005 15:12:32 -0000
@@ -857,7 +857,7 @@
             // traditional argument format
             $args = implode(',', array_values($attrs));
             if (empty($args)) {
-                $args = 'null';
+                $args = '';
             }
         }