wp-rocket icon indicating copy to clipboard operation
wp-rocket copied to clipboard

Fix 5361: guard preload table

Open CrochetFeve0251 opened this issue 2 years ago • 1 comments

Description

Fix a warning by guarding methods using the table.

Fixes #5361

Type of change

Please delete options that are not relevant.

  • [ ] Bug fix (non-breaking change which fixes an issue)

Is the solution different from the one proposed during the grooming?

No, has we changed the solution for the issue 5153, I added guard for method in this PR.

How Has This Been Tested?

  • [ ] Automated Test
  • [ ] Manual Test

Checklist:

  • [ ] My code follows the style guidelines of this project
  • [ ] I have performed a self-review of my own code
  • [ ] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [ ] My changes generate no new warnings
  • [ ] I have added tests that prove my fix is effective or that my feature works
  • [ ] New and existing unit tests pass locally with my changes
  • [ ] Any dependent changes have been merged and published in downstream modules

CrochetFeve0251 avatar Aug 29 '22 14:08 CrochetFeve0251

While it's probably good to guard against missing table, I don't think that solves the original issue, as as reported the table does exist, and we do want the cronjobs to run in CLI.

remyperona avatar Aug 30 '22 13:08 remyperona