Sitevariable_model->retrieve_one() issue

edited June 2011 in Bug Reports
When I tried to use the retrieve_one method in sitevariable_model it gave an error saying its trying to use an object as an array. Turns out that method is getting an object back from the "find_one" method and then trying to use it as an array. function retrieve_one($name = null) { $vars = $this->find_one(array('active' => 'yes', 'name' => $name)); return $vars['value']; }
The third input variable in "find_one" is "return_method" and it works fine when you set it to "array":
find_one(array('active' => 'yes', 'name' => $name),null,'array');
At least if I use "find_one" like this instead of "retrieve_one".

Comments

Sign In or Register to comment.