-
Notifications
You must be signed in to change notification settings - Fork 178
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot access protected property MY_Loader::$_ci_cached_vars #22
Comments
This is caused because CodeIgniter changed $_ci_cached_vars to a protected variable. Hopefully this can get fixed on either end. |
so, there's nothing I can do right now? |
You can comment out line 146 in MY_Parser.php, but I wouldn't recommend it, I don't know if it breaks anything anywhere else. |
I'd prefer waiting for an official fix. Do you know if they are still developing this project? |
this library doesn't come with a MY_Parser class so I'm guessing that is your code that is breaking. $_ci_cached_vars is protected but you can now use $this->load->get_var('foo') instead of $this->load->_ci_cached_vars['foo'] |
@bubbafoley: the My_Parser is a Dwoo Parser Class. I'm using it since it's explained so in the documentation:
anyway, the line throwing the error is this: $data = array_merge($data, $this->_ci->load->_ci_cached_vars); |
Ah, I see now. That's a bug in the codeigniter-dwoo library so you might be better off moving this issue over there https://github.com/philsturgeon/codeigniter-dwoo. What I would do, though, is create application/core/MY_Loader.php and redeclare _ci_cached_vars as public <?php
class MY_Loader extends CI_Loader {
public $_ci_cached_vars;
} |
Hi,
when I try to run the dwoo_test I get this error:
PHP Fatal error: Cannot access protected property MY_Loader::$_ci_cached_vars in /home/carlo/public_html/website/application/libraries/MY_Parser.php on line 146
I'm using the last CodeIgniter version downloaded from github.
Any ideas?
The text was updated successfully, but these errors were encountered: