Reputation: 3696
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>';
Upvotes: 1
Views: 549
Reputation: 7347
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.
Upvotes: -1
Reputation: 30766
That line should be:
$this->session->set_flashdata('alert', '<ul>'.validation_errors('<li>','</li>').'</ul>');
Upvotes: 2