wp-rocket
wp-rocket copied to clipboard
Fix 5361: guard preload table
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
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.