Welcome Guest, Not a member yet? Register   Sign In
Erakanauth error!
#1

[eluser]felixk[/eluser]
Hello!

I recently changed to a linux server from windows. And now I have the error:
Quote:A PHP Error was encountered

Severity: Notice

Message: Trying to get property of non-object

Filename: libraries/Erkanaauth.php

Line Number: 48

This is very weird since I haven't changed anything.

Any ideas?

//Felix Karlsson
#2

[eluser]dsloan[/eluser]
Possibly case differences between the filename and the library name - I've found problems with this in the past.

Diarmid
#3

[eluser]felixk[/eluser]
Yes i noticed that with other files. But even if i change it right it doesn't work :S
#4

[eluser]dsloan[/eluser]
Can you paste line 48 from your version of that file?
#5

[eluser]felixk[/eluser]
Code:
function try_session_login() {
    /* 48 */    if ($this->CI->session->userdata('user_id')) {
            $query = $this->CI->db->query('SELECT COUNT(*) AS total FROM users WHERE id = ' . $this->CI->session->userdata('user_id'));
            $row = $query->row();
            if ($row->total != 1) {
                // Bad session - kill it
                $this->logout();
                return FALSE;
            } else {
                return TRUE;
            }
        } else {
            return FALSE;
        }
    }
#6

[eluser]dsloan[/eluser]
Have you loaded/initialised the session before this? I'm assuming here it's $this->CI->session which is undefined at this point.

However, having said that - if you're referencing this within a libary, then can you do some debugging and check just exactly which part of that is causing the problem, i.e. which is the non-object, $this->CI, $this->CI->session...

But you say this was working previously so I assume you know all this already.
#7

[eluser]felixk[/eluser]
I reinstalled Erkanaauth and had to change two things.

Code:
1. Erkanaauth_helper.php -> erkanaauth_helper.php
2. In Erkanaauth.php line 13:
$this->CI->load->helper('Erkanaauth_helper'); -->
$this->CI->load->helper('erkanaauth_helper');

I hope this will be helpful for someone!

Thanks

//Felix Karlsson




Theme © iAndrew 2016 - Forum software by © MyBB