<span class="resolved" aria-label="Resolved" title="Topic is resolved."></span>E_WARNING : Undefined array key “dir” : name-directory/shortcode.php (284)

Replies: 2

I was getting this warning in my logs.

I suspect is triggered by bots/crawlers mostly.

To fix, locate;

else if(isset($_GET['name_directory_startswith']) && ($_GET['dir'] == $dir))

Update to;

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.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer