cvs: smarty / NEWS /libs Smarty.class.php

[email protected] ("Monte Ohrt")
Newsgroups php.smarty.cvs
Message-ID <cvsmohrt1124290715@cvsserver>
mohrt		Wed Aug 17 10:58:35 2005 EDT

  Modified files:              
    /smarty	NEWS 
    /smarty/libs	Smarty.class.php 
  Log:
  return valid reference in get_template_vars() when given var is non-existant
  
  
http://cvs.php.net/diff.php/smarty/NEWS?r1=1.511&r2=1.512&ty=u
Index: smarty/NEWS
diff -u smarty/NEWS:1.511 smarty/NEWS:1.512
--- smarty/NEWS:1.511	Fri Aug 12 15:38:52 2005
+++ smarty/NEWS	Wed Aug 17 10:58:28 2005
@@ -1,4 +1,6 @@
- - add escape type "urlpathinfo" to escape modifier
+ - return valid reference in get_template_vars() when given var is
+   non-existant (monte)
+ - add escape type "urlpathinfo" to escape modifier (monte)
  
 Version 2.6.10 (Aug 5, 2005)
 ----------------------------
http://cvs.php.net/diff.php/smarty/libs/Smarty.class.php?r1=1.517&r2=1.518&ty=u
Index: smarty/libs/Smarty.class.php
diff -u smarty/libs/Smarty.class.php:1.517 smarty/libs/Smarty.class.php:1.518
--- smarty/libs/Smarty.class.php:1.517	Fri Aug  5 16:53:03 2005
+++ smarty/libs/Smarty.class.php	Wed Aug 17 10:58:32 2005
@@ -30,7 +30,7 @@
  * @version 2.6.11-dev
  */
 
-/* $Id: Smarty.class.php,v 1.517 2005/08/05 20:53:03 mohrt Exp $ */
+/* $Id: Smarty.class.php,v 1.518 2005/08/17 14:58:32 mohrt Exp $ */
 
 /**
  * DIR_SEP isn't used anymore, but third party apps might
@@ -1055,9 +1055,12 @@
     {
         if(!isset($name)) {
             return $this->_tpl_vars;
-        }
-        if(isset($this->_tpl_vars[$name])) {
+        } elseif(isset($this->_tpl_vars[$name])) {
             return $this->_tpl_vars[$name];
+        } else {
+            // var non-existant, return valid reference
+            $_tmp = null
+            return $_tmp;   
         }
     }
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.