Skip to content
Snippets Groups Projects
Commit 47514f19 authored by Vitalii Podoba's avatar Vitalii Podoba Committed by Italo Mairo
Browse files

Issue #3224364 by HitchShock: PHP 8 compatibilities

parent 8fcfdef3
No related branches found
No related tags found
No related merge requests found
......@@ -44,7 +44,7 @@ class GeocoderThrottle implements GeocoderThrottleInterface {
// The throttle mechanism uses milliseconds, so we convert the argument
// and convert back the result as sleep() uses seconds.
$time_to_wait = $this->throttle->throttle($key, $throttle_info['limit'], $throttle_info['period'] * 1000);
sleep($time_to_wait / 1000);
sleep(ceil($time_to_wait / 1000));
}
}
......
......@@ -67,7 +67,7 @@ class Random extends ProviderBase {
$manager = new CountryManager($this->getModuleHandler());
$countries = $manager->getList();
uksort($countries, function () {
return rand() > rand();
return rand() <=> rand();
});
$country = array_slice($countries, 0, 1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment