Jump to content

Can't use method return


Xtremer360

Recommended Posts

I'm trying to figure out why I'm getting a Fatal error: Can't use method return value in write context in /home/xtremer/public_html/kowmanager/app/controllers/login.php on line 101 error.

Line 101 is 
[code=php:0]
if (isset($this->session->userdata('failed_logins')))

 

/**
     * Checks to see if the max number of attempts have been exceeded.
     * 
     * @param string $post_username Posted value of a username field.
     * @return boolean TRUE/FALSE Depends on if login attempts have been exceeded or not.
     */
    private function is_max_failed_login_attempts_exceeded($post_username)
    {
        if (isset($this->session->userdata('failed_logins')))
        {
            if ($this->session->userdata('failed_logins') == $this->config->item('failed_login_limit'))
            {
                $this->users_model->lock_out_user($post_username, date('Y-m-d H:i:s', $this->config->item('wait_time')));
                return TRUE;
            }
            $this->session->userdata('failed_logins')++;
            return FALSE;
        }
        else
        {
            $this->session->userdata('failed_logins') == 1;
            return FALSE;
        }
    }

Link to comment
https://forums.phpfreaks.com/topic/267541-cant-use-method-return/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.