Skip to content
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

Problem when added single object to be passed to a view #2

Open
danielgomezdidier opened this issue Feb 20, 2011 · 3 comments
Open

Comments

@danielgomezdidier
Copy link

When you try to pass a single object to a view you get the following error:

Object of class stdClass could not be converted to string

But as soon you wrap the object in to an array everything work fine.

The problem is present when you use
$data[single_obj] = $this->a_model->get_single();
$this->template->build('some_view', $data);
or

$this->template->set('single_obj', $this->a_model->get_single() );
$this->template->buil('some_view');

Thank you.

This library is great-

@philsturgeon
Copy link
Owner

Paste the full error.

@PerceptionLLC
Copy link

You probably need to disable the parsing library in the config. Change $config['parser_enabled'] = TRUE; to $config['parser_enabled'] = FALSE;.

@curiousteam
Copy link

You probably need to disable the parsing library in the config. Change $config['parser_enabled'] = TRUE; to $config['parser_enabled'] = FALSE;.

Yes, this solves the problem. But how can we use both feature like: Send objects as param and user parser?
I faced the same problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants