littlebizzy / slickstack

Lightning-fast WordPress on Nginx
https://slickstack.io
GNU General Public License v3.0
643 stars 113 forks source link

Invalid argument supplied for foreach (Clear Caches MU plugin) #99

Closed corzel closed 2 years ago

corzel commented 3 years ago

Hi! I'm getting this warning in php log:

Warning: Invalid argument supplied for foreach() in /var/www/html/wp-content/mu-plugins/clear-caches/drivers/nginx.php on line 248
Stack trace
1. {main}() /var/www/html/wp-admin/admin-ajax.php:0
2. require_once() /var/www/html/wp-admin/admin-ajax.php:22
3. require_once() /var/www/html/wp-load.php:37
4. require_once() /var/www/html/wp-config.php:482
5. do_action() /var/www/html/wp-settings.php:560
6. WP_Hook->do_action() /var/www/html/wp-includes/plugin.php:484
7. WP_Hook->apply_filters() /var/www/html/wp-includes/class-wp-hook.php:316
8. LittleBizzy\ClearCaches\Core\AJAX->init() /var/www/html/wp-includes/class-wp-hook.php:292
9. LittleBizzy\ClearCaches\Core\AJAX->handleRequest() /var/www/html/wp-content/mu-plugins/clear-caches/libraries/wp-ajax.php:118
10. LittleBizzy\ClearCaches\Core\AJAX->purge() /var/www/html/wp-content/mu-plugins/clear-caches/core/ajax.php:87
11. LittleBizzy\ClearCaches\Core\AJAX->purgeNginx() /var/www/html/wp-content/mu-plugins/clear-caches/core/ajax.php:138
12. LittleBizzy\ClearCaches\Drivers\Nginx->purgeCache() /var/www/html/wp-content/mu-plugins/clear-caches/core/ajax.php:168
13. LittleBizzy\ClearCaches\Drivers\Nginx->isValidPath() /var/www/html/wp-content/mu-plugins/clear-caches/drivers/nginx.php:111
14. LittleBizzy\ClearCaches\Drivers\Nginx->validateDirList() /var/www/html/wp-content/mu-plugins/clear-caches/drivers/nginx.php:225
15. LittleBizzy\ClearCaches\Drivers\Nginx->validateDirList() /var/www/html/wp-content/mu-plugins/clear-caches/drivers/nginx.php:256

Regards!!!!!

jessuppi commented 3 years ago

Hello @corzel yes I believe we have an open issue(s) on this already, if you want to help us debug please feel free or you can open an Issue on the relevant plugin repo instead too --

jessuppi commented 2 years ago

I'm not sure if this is a duplicate of: https://github.com/littlebizzy/slickstack/issues/30

But since this involves our MU plugin Clear Caches, it should probably be an Issue on that repo instead. Several of our MU plugins are being deprecated, however, and/or will be rewritten from scratch in the near future.