Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author tnomi

    (@tnomi)

    Thank you for your feedback.
    Please try to change like the following code for now.
    /attendance-manager/class/class-attmgr.php on line 239

    Before:

    public function current_user() {
    	// Current operator
    	get_currentuserinfo();
    	...

    After:

    public function current_user() {
    	global $current_user;
    	// Current operator
    	if( function_exists( 'wp_get_current_user' ) ){
    		$current_user = wp_get_current_user();
    	}
    	else{
    		get_currentuserinfo();
    	}
    	...

    And I would like to correct it in the next version.

    Thread Starter Aurovrata Venet

    (@aurovrata)

    Thank you, I have corrected it in the code. When will you update the next version?

    Plugin Author tnomi

    (@tnomi)

    I will update it sometime this week or next week.

    Thread Starter Aurovrata Venet

    (@aurovrata)

    Actually, the call to the function wp_get_current_user needs to be done after the plugin is loaded (on the init action or later).

    So I have removed the constructor call to the load() function (line 61) as it is being called by the plugins_loaded action (line 68). It now works well.

    Plugin Author tnomi

    (@tnomi)

    Thank you for advice.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘PHP Error’ is closed to new replies.