Title: Some undefined indexes while debugging
Last modified: February 27, 2019

---

# Some undefined indexes while debugging

 *  Plugin Contributor [Rolf Allard van Hagen](https://wordpress.org/support/users/ravanh/)
 * (@ravanh)
 * [7 years, 3 months ago](https://wordpress.org/support/topic/some-undefined-indexes-while-debugging/)
 * Hi, while trying to debug another issue (redis purge failing) I ran into some
   undefined indexes. Here is a fix:
 * Replace lines 283 – 300 in admin/class-nginx-helper-admin.php by:
 *     ```
       		$data['redis_enabled_by_constant'] = (
       			defined( 'RT_WP_NGINX_HELPER_REDIS_HOSTNAME' ) &&
       			defined( 'RT_WP_NGINX_HELPER_REDIS_PORT' ) &&
       			defined( 'RT_WP_NGINX_HELPER_REDIS_PREFIX' )
       		);
   
       		if ( $data['redis_enabled_by_constant'] ) {
       			$data['enable_purge']              = true;
       			$data['cache_method']              = 'enable_redis';
       			$data['redis_hostname']            = RT_WP_NGINX_HELPER_REDIS_HOSTNAME;
       			$data['redis_port']                = RT_WP_NGINX_HELPER_REDIS_PORT;
       			$data['redis_prefix']              = RT_WP_NGINX_HELPER_REDIS_PREFIX;
       		}
   
       		return $data;
       ```
   

The topic ‘Some undefined indexes while debugging’ is closed to new replies.

 * ![](https://ps.w.org/nginx-helper/assets/icon.svg?rev=2360932)
 * [Nginx Helper](https://wordpress.org/plugins/nginx-helper/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nginx-helper/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nginx-helper/)
 * [Active Topics](https://wordpress.org/support/plugin/nginx-helper/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nginx-helper/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nginx-helper/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: [Rolf Allard van Hagen](https://wordpress.org/support/users/ravanh/)
 * Last activity: [7 years, 3 months ago](https://wordpress.org/support/topic/some-undefined-indexes-while-debugging/)
 * Status: not resolved