diff options
author | Thomas Steur <tsteur@users.noreply.github.com> | 2021-03-03 11:50:32 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-03 11:50:32 +0300 |
commit | 4aa36276203768513e888a394112f5acbb3da5c7 (patch) | |
tree | bdd9c17683f9d85a782222b9ae41b9405bedbb31 /plugins/GeoIp2 | |
parent | 5b07a224820003cd6de727fff179528852cbf3a7 (diff) |
Prevent possible warning during GeoIP2 update if providers aren't initialised (#17295)
refs https://wordpress.org/support/topic/repeated-php-warnings-on-cron-execution/
It should be better to use the method anyway instead of hard coding the variable.
Diffstat (limited to 'plugins/GeoIp2')
-rw-r--r-- | plugins/GeoIp2/GeoIP2AutoUpdater.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/GeoIp2/GeoIP2AutoUpdater.php b/plugins/GeoIp2/GeoIP2AutoUpdater.php index 5fd92541cb..8e7013c887 100644 --- a/plugins/GeoIp2/GeoIP2AutoUpdater.php +++ b/plugins/GeoIp2/GeoIP2AutoUpdater.php @@ -321,7 +321,7 @@ class GeoIP2AutoUpdater extends Task } // ensure the cached location providers do no longer block any files on windows - foreach (LocationProvider::$providers as $provider) { + foreach (LocationProvider::getAllProviders() as $provider) { if ($provider instanceof Php) { $provider->clearCachedInstances(); } |