Whats wring with this code?
if(isset($this->session->flashdata('login_error'))) { // Line 39
echo "You entered an incorrect email or password!";
}
I use Codeigniter and session is loaded in autoload.php
.
The error message I get is:
Fatal error: Can't use method return value in write context in /Applications/XAMPP/xamppfiles/htdocs/application/views/login_view.php on line 39
isset
is only necessary if you're trying to work with variables that may not exist. In your case you're calling a function, which certainly exists. Hence you don't need and in fact can't use isset
here. Just use if ($this->session->flashdata('login_error'))
if you want to test whether the value is truthy.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With