Skip to content
Snippets Groups Projects
Commit 6d303114 authored by catch's avatar catch
Browse files

Issue #3461945 by mstrelan, bbrala: Fix instances of floats passed to functions expecting ints

(cherry picked from commit 4d805e5d)
parent 1f4aa5cf
No related branches found
No related tags found
2 merge requests!11185Issue #3477324 by andypost, alexpott: Fix usage of str_getcsv() and fgetcsv() for PHP 8.4,!9944Issue #3483353: Consider making the createCopy config action optionally fail...
Pipeline #226658 passed
......@@ -226,7 +226,7 @@ protected function processQueues() {
// Each queue will be processed immediately when it is reached for the
// first time, as zero > currentTime will never be true.
if ($process_from > $this->time->getCurrentMicroTime()) {
$this->usleep(round($process_from - $this->time->getCurrentMicroTime(), 3) * 1000000);
$this->usleep((int) round($process_from - $this->time->getCurrentMicroTime(), 3) * 1000000);
}
try {
......
......@@ -138,7 +138,7 @@ public static function generateSampleValue(FieldDefinitionInterface $field_defin
}
else {
// Textfield handling.
$max = ceil($settings['max_length'] / 3);
$max = (int) ceil($settings['max_length'] / 3);
$value = substr($random->sentences(mt_rand(1, $max), FALSE), 0, $settings['max_length']);
}
......
......@@ -1030,8 +1030,8 @@ function simpletest_script_get_test_list() {
}
if ((int) $args['ci-parallel-node-total'] > 1) {
$slow_tests_per_job = ceil(count($slow_tests) / $args['ci-parallel-node-total']);
$tests_per_job = ceil(count($test_list) / $args['ci-parallel-node-total']);
$slow_tests_per_job = (int) ceil(count($slow_tests) / $args['ci-parallel-node-total']);
$tests_per_job = (int) ceil(count($test_list) / $args['ci-parallel-node-total']);
$test_list = array_merge(array_slice($slow_tests, ($args['ci-parallel-node-index'] -1) * $slow_tests_per_job, $slow_tests_per_job), array_slice($test_list, ($args['ci-parallel-node-index'] - 1) * $tests_per_job, $tests_per_job));
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment