1

I'm getting this fatal error message:

Fatal error: Can't use method return value in write context in C:\wamp\www\mySite\application\controllers\eventsManager.php on line 115

Could someone tell me what it means?

The line it refers to is this:

$this->session->set_flashdata('alert') = '<ul>' . validation_errors('<li>', '</li>') . '</ul>';
1
  • What's $this->session->set_flashdata('alert') doing? The error usually means you have to store value returned from a function before you can assign any values to it. Commented Jul 29, 2010 at 15:02

2 Answers 2

2

That line should be:

$this->session->set_flashdata('alert', '<ul>'.validation_errors('<li>','</li>').'</ul>');
Sign up to request clarification or add additional context in comments.

1 Comment

Ofcourse. Me just being dumb. Thanks for being a fresh set of eyes, Phil. ps just downloaded pyro-cms and loving what I'm seeing so far...
-1

From a quick google search, I have gathered that the empty() function may be the culprit. It isn't in your code but it may be in set_flashdata() somewhere. empty() can only check a variable, not the return value of a function. Assign validation_errors('<li>','</li>') to at temp variable and insert the temp var instead.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.