Page 1 of 1

Call to undefined function is_logged_in()

PostPosted: Wed Aug 15, 2012 5:14 pm
by EdB
Technically you can see this bug but you have to look in a file called error_log in the installation's root. Or, more accurately, someone running a real QP would have to look. I have it in all my QP5 installations and the source of the error is the same in QP-latest right now.

/qp_inc/_core/_misc.funcs.php:
Code: Select all
    if( ! is_logged_in() && ! $debug_visitors )
    { 
// No debug for visitors
        
return;
    } 

What I did on 2 installations is to replace the undefined function with what the undefined function does:
Code: Select all
    global $current_User;
    if( ! ( 
is_object$current_User ) && ! empty( $current_User->ID ) ) && ! $debug_visitors )
    {
        
// No debug for visitors
        
return;
    } 

Putting that in human-friendly terms: IF (current_User is an object AND that object has ID set) AND debug for visitors is not true THEN get out. That was the idea behind "debug_visitors" but we probably tested it and found no problem but didn't log out and test it and check error logs. Heck I dunno if I even get the same file created when I run on localhost.

Anyway if someone running real QP could confirm or deny this error and this fix I'll branch it up and submit it.

Re: Call to undefined function is_logged_in()

PostPosted: Wed Aug 15, 2012 8:27 pm
by leeturner
I have looked at a number of my live QP installs and I can't see anything in the error_log file about the is_logged_in() function.

What is the error in the log ?

Re: Call to undefined function is_logged_in()

PostPosted: Wed Aug 15, 2012 9:31 pm
by EdB
[11-Aug-2012 02:34:27 UTC] PHP Fatal error: Call to undefined function is_logged_in() in /...path.../qp_inc/_core/_misc.funcs.php on line 1877

The line number changes from QP to QP5 which is probably due to the header up top of the file being different. Haven't done a line-by-line to see if it is something else though.

Re: Call to undefined function is_logged_in()

PostPosted: Fri Aug 17, 2012 3:51 pm
by Kimberly
I am not even seeing an error log.