Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 Set default value for undefined variable #162

Merged
merged 1 commit into from Dec 13, 2018

Conversation

Projects
None yet
3 participants
@Joel-James
Copy link
Contributor

commented Nov 19, 2018

There is an undefined error when we install the plugin for the first time and if Redis is not available.

@rahulsprajapati

This comment has been minimized.

Copy link
Member

commented Nov 29, 2018

Hello @Joel-James

I've tried to reproduce this issue, but couldn't able to reproduce the issue. Can you please give me steps to reproduce this issue.

Steps I tried for reproduce the issue:

  1. Setup site without any cache on server and installed/activated nginx-helper and checked settings page.

  2. Tested by adding constant redis constant values in wp-config.php also ( there was no cache enabled ).

      define( 'RT_WP_NGINX_HELPER_REDIS_HOSTNAME', '127.0.0.1' );
      define( 'RT_WP_NGINX_HELPER_REDIS_PORT', '6379' );
      define( 'RT_WP_NGINX_HELPER_REDIS_PREFIX', 'nginx-cache:' );
    
@LeoColomb

This comment has been minimized.

Copy link

commented Dec 10, 2018

@rahulsprajapati

Can you please give me steps to reproduce this issue.

  1. Enable FastCGI cache and do not set any constant.
  2. Enable nginx-helper.
@LeoColomb

This comment has been minimized.

Copy link

commented Dec 10, 2018

Edited my previous reply for more general steps.

This is because of these lines, where the array returned may not contain redis_enabled_by_constant:

if ( ! $is_redis_enabled ) {
return $data;
}

@rahulsprajapati

This comment has been minimized.

Copy link
Member

commented Dec 13, 2018

Thank you @LeoColomb for more details on this. I'll look into this soon.

@rahulsprajapati

This comment has been minimized.

Copy link
Member

commented Dec 13, 2018

Got the error, and this PR fix the issue.
Thank you @Joel-James and @LeoColomb

@rahulsprajapati rahulsprajapati merged commit 7bced91 into rtCamp:master Dec 13, 2018

1 of 2 checks passed

continuous-integration/travis-ci/pr The Travis CI build could not complete due to an error
Details
WIP Ready for review
Details
@LeoColomb

This comment has been minimized.

Copy link

commented Jan 17, 2019

@rahulsprajapati Is it possible to make a release with the fix? Thanks!

@Joel-James Joel-James deleted the Joel-James:fix/undefined_var branch Jan 19, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can鈥檛 perform that action at this time.