On second thought - I don't see the reason for checking the existence
authorMichael J. Rubinsky <mrubinsk@horde.org>
Thu, 26 Feb 2009 14:06:31 +0000 (09:06 -0500)
committerMichael J. Rubinsky <mrubinsk@horde.org>
Thu, 26 Feb 2009 14:08:52 +0000 (09:08 -0500)
of a public member in __get() - if it existed, __get() would never get
called - and checking this would have the effect of making all non-public
members public. Just return an empty string if a non-visible member is
accessed.

framework/View/lib/Horde/View/Base.php

index f479c06..1e56613 100644 (file)
@@ -83,13 +83,13 @@ abstract class Horde_View_Base
     }
 
     /**
-     * Return a view variable
+     * Return an empty string if a variable does not exist.
      *
      * @param string $name Variable name to retrieve
      */
     public function __get($name)
     {
-        return isset($this->$name) ? $this->$name : '';
+        return '';
     }
 
     /**