Title: E_WARNING : Undefined array key &#8220;dir&#8221; : name-directory/shortcode.php (284)
Last modified: November 4, 2023

---

# E_WARNING : Undefined array key “dir” : name-directory/shortcode.php (284)

 *  Resolved [jibbius](https://wordpress.org/support/users/jibbius/)
 * (@jibbius)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/e_warning-undefined-array-key-dir-name-directory-shortcode-php-284/)
 * I was getting this warning in my logs.
 * I suspect is triggered by bots/crawlers mostly.
 * **To fix, locate;**
 *     ```wp-block-code
       else if(isset($_GET['name_directory_startswith']) && ($_GET['dir'] == $dir))
       ```
   
 * **Update to;**
 *     ```wp-block-code
       else if(isset($_GET['name_directory_startswith']) && isset($_GET['dir']) && ($_GET['dir'] == $dir))
       ```
   
 * If there a better method to submit pull requests, please call out.

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

 *  Plugin Author [Jeroen Peters](https://wordpress.org/support/users/jeroenpeters1986/)
 * (@jeroenpeters1986)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/e_warning-undefined-array-key-dir-name-directory-shortcode-php-284/#post-17175696)
 * Hi [@jibbius](https://wordpress.org/support/users/jibbius/)
 * Thanks for contacting me. I will fix this and publish a new version soon along
   with some other little fixes.
 * There is no way to create a PR as WordPress uses SVN. I don’t feel like creating
   all kinds of roundtours via Git, so at this moment, this forum or my emailaddress
   is the only way.
 * Thanks again!
 * Kind regards,
 * Jeroen Peters
 *  Plugin Author [Jeroen Peters](https://wordpress.org/support/users/jeroenpeters1986/)
 * (@jeroenpeters1986)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/e_warning-undefined-array-key-dir-name-directory-shortcode-php-284/#post-17176287)
 * Hi [@jibbius](https://wordpress.org/support/users/jibbius/), this fixed in v1.28.5
 * Thanks again!
 *  Thread Starter [jibbius](https://wordpress.org/support/users/jibbius/)
 * (@jibbius)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/e_warning-undefined-array-key-dir-name-directory-shortcode-php-284/#post-17176454)
 * No worries – thanks so much 👍

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

The topic ‘E_WARNING : Undefined array key “dir” : name-directory/shortcode.php (
284)’ is closed to new replies.

 * ![](https://ps.w.org/name-directory/assets/icon-128x128.png?rev=1008185)
 * [Name Directory](https://wordpress.org/plugins/name-directory/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/name-directory/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/name-directory/)
 * [Active Topics](https://wordpress.org/support/plugin/name-directory/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/name-directory/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/name-directory/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [jibbius](https://wordpress.org/support/users/jibbius/)
 * Last activity: [2 years, 7 months ago](https://wordpress.org/support/topic/e_warning-undefined-array-key-dir-name-directory-shortcode-php-284/#post-17176454)
 * Status: resolved