Viewing 4 replies - 1 through 4 (of 4 total)
  • I’m Getting this same error too. Would love help resolving it.

    I have the same error. Pleace help:

    Warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in ..../wp-content/plugins/display-name-author-permalink/display-name-author-permalink.php on line 55

    What cam we do???

    The Error is under Author

    Ok, i dont no, but i have make this:

    In the display-name-author-permalink.php
    Search:

    // Replace the username in author links generated in the theme with the users display name
    	function filter_author($link,$author_id,$author_nicename) {
    
            	if ( array_key_exists($author_nicename, $this->users) )
    	                $link = str_replace($author_nicename,$this->users[$author_nicename], $link);
    	        return $link;
    	}

    replace with

    // Replace the username in author links generated in the theme with the users display name
    	function filter_author($link,$author_id,$author_nicename) {
    	if(is_string($author_nicename)) {
            	if ( array_key_exists($author_nicename, $this->users) )
    	                $link = str_replace($author_nicename,$this->users[$author_nicename], $link);
    	        return $link;
    	}
    	}

    I have this snippet just found. I do not know whether that’s right or what happened to it. The error is no longer displayed.
    Important: I do not guarantee.

    Dear Support Team. Please tell me how to fix this error! If the code is ok, then you say please.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Error, help! Warning: array_key_exists()’ is closed to new replies.