I'm facing a problem on PHP 5.3.6, I'm getting the following error:
Indirect modification of overloaded property CI_Session::$form_certs has no effect
I read about it and found an ugly solution to an old PHP 5.2.x bug from 2007 here.
But in my case it's not the __get()
method causing the error but the __set()
method.
My code looks like this:
class CI_Session{
__set($name,$val){
return $_SESSION[$name] = $val;
}
}
And the line causing the error:
$this->session->form_cert['foo'] = 'bar'; //$this->session is an instance of CI_Session
I have tried explicitly setting $this->session->form_cert = array();
before doing the above but the problem persists.
I also tested this on PHP 5.3.3 and had the same results.
What can I do开发者_Go百科 besides using this old workaround (that screws up another 500+ lines of code I have already written)? (Is this the same bug? Why would it still exist in 5.3.6?)
精彩评论