Title: Error, help! Warning: array_key_exists()
Last modified: August 21, 2016

---

# Error, help! Warning: array_key_exists()

 *  [nkeatign](https://wordpress.org/support/users/nkeatign/)
 * (@nkeatign)
 * [12 years, 6 months ago](https://wordpress.org/support/topic/error-help-warning-array_key_exists/)
 * Getting the following error:
 * Warning: array_key_exists() [function.array-key-exists]: The first argument should
   be either a string or an integer in /nas/wp/www/staging/stackstreet/wp-content/
   plugins/display-name-author-permalink/display-name-author-permalink.php on line
   55
 * [http://wordpress.org/plugins/display-name-author-permalink/](http://wordpress.org/plugins/display-name-author-permalink/)

Viewing 4 replies - 1 through 4 (of 4 total)

 *  [Dannyroberts](https://wordpress.org/support/users/dannyroberts/)
 * (@dannyroberts)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/error-help-warning-array_key_exists/#post-4377836)
 * I’m Getting this same error too. Would love help resolving it.
 *  [DjPD](https://wordpress.org/support/users/djpd/)
 * (@djpd)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/error-help-warning-array_key_exists/#post-4377844)
 * 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???
 *  [DjPD](https://wordpress.org/support/users/djpd/)
 * (@djpd)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/error-help-warning-array_key_exists/#post-4377845)
 * The Error is under Author
 *  [DjPD](https://wordpress.org/support/users/djpd/)
 * (@djpd)
 * [11 years, 9 months ago](https://wordpress.org/support/topic/error-help-warning-array_key_exists/#post-4377846)
 * 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.

 * ![](https://s.w.org/plugins/geopattern-icon/display-name-author-permalink.svg)
 * [Display Name Author Permalink](https://wordpress.org/plugins/display-name-author-permalink/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/display-name-author-permalink/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/display-name-author-permalink/)
 * [Active Topics](https://wordpress.org/support/plugin/display-name-author-permalink/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/display-name-author-permalink/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/display-name-author-permalink/reviews/)

 * 4 replies
 * 3 participants
 * Last reply from: [DjPD](https://wordpress.org/support/users/djpd/)
 * Last activity: [11 years, 9 months ago](https://wordpress.org/support/topic/error-help-warning-array_key_exists/#post-4377846)
 * Status: not resolved