So I guess I'm answering my own questions here. =)
I did some research and ternary statments apparently don't return references? Yet when you have the Zend Platform running, they do?
Anyway, I'll be submitting a bug for Zend_View_Abstract to fix this.
As an aside. This link: http://www.zend.com/manual/language.operators.comparison.php states at the bottom that ternary statements always return by value, not reference, and that a warning would be thrown if used as a return from a pass-by-ref function. I had all the error reporting turned on and rever recieved a warning. Is this a bug or user error? Also, seems to me that Zend Platform changes the behavior of the laguage in an undocumented way, isn't this a bad thing?
I would appreciate any comments on this.
Lee
On 10/25/06, Lee Saferite <[EMAIL PROTECTED]
> wrote:
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 <[EMAIL PROTECTED] > 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 <[EMAIL PROTECTED]> wrote:=) Good call. Too much Cut and Paste. 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 <[EMAIL PROTECTED] > 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 <[EMAIL PROTECTED]> wrote:Software details:
------------------------
Apache 2.0.52
PHP 5.0.4
Zend Framework 0.1.5 (not on demo laptops)
