Support » Plugin: Nginx Helper » Some undefined indexes while debugging

  • Plugin Contributor RavanH

    (@ravanh)


    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;
    
  • You must be logged in to reply to this topic.