PHP Error: undefined index error and warning


This article describes a fix for the common “undefined index” PHP Error. This error is generally caused by WP_DEBUG function.

Example of the Error:

Notice: Undefined index: some_variable in E:domainsexample.comwwwrootwp-contentthemesKarmatruethemes_frameworkextendedseo-moduleseo_module.php on line225


  • Access your WordPress Theme on your web server and locate the file named wp-config.php
  • Scroll to the bottom and check to see if the WP_DEBUG function is set to TRUE.
  • Set the WP_DEBUG function to FALSE:
  • Save the file and all will be resolved.

Please note: If you require WP_DEBUG to be set to TRUE simply add the following codes in your theme’s functions.php file.

 error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING); ini_set('display_errors', '1'); 

[search_terms]php error, undefined index, PHP Error, SEO Error, seo error, line225[/search_terms]