List Info

Thread: Weird Issue (Slightly OT)




Weird Issue (Slightly OT)
user name
2006-10-25 14:55:46
Wow,

   I'm not a master PHP programmer, so this confuses me.

This fails:
    public function __get($key)
    {
     ;   /**
 ;        * todo exception?
         */
   ;     if ($key[0] != '_') {
     ;       return isset($this->_vars[$key]) ? $this->_vars[$key] : null;
        }
    }

Yet this doesn't:
public function __get($key)
  {
   ;     /**
         * todo exception?
       ;  */
     ;   if ($key[0] != '_') {

   ;         if(isset($this->_vars[$key]))
            {
     ;           return $this->_vars[$key];
       ;     }
     ;       else
            {
     ;           return null;
            }
  }
}


On 10/25/06, Lee Saferite < lee.saferitegmail.com">lee.saferitegmail.com> wrote:
Ok, so I tried changing the __get method of the Zend_View_Abstract class to one I found here:
http://framework.zend.com/issues/browse/ZF-298
And not it works.

So, could someone explain to me what is going on exactly?
I mean, the Zend_View_Abstract code works fine using Zend Platform, yet chokes without it?

Lee.

On 10/25/06, Lee Saferite < lee.saferitegmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">lee.saferitegmail.com> wrote:
=)  Good call. ; Too much Cut and Paste.&nbsp; we DO use ZF on the laptops.


And as an update, I have further isolated it to the __get/__set functions having the issue.

Lee.


On 10/25/06, Christopher Östlund < christopher.oestlundgmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">christopher.oestlundgmail.com > wrote:
Just making sure the below quote was a typo. Not using Zend Framework on the demo laptops running the Zend Framework application?


On 10/25/06, Lee Saferite < lee.saferitegmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">lee.saferitegmail.com> wrote:
&nbsp;
Software details:
------------------------
Apache 2.0.52
PHP 5.0.4
Zend Framework 0.1.5 (not on demo laptops)




[1]

about | contact  Other archives ( Real Estate discussion Medical topics )