Commit e9eff5cd 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 873b1e7b
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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 {
+1 −1
Original line number Diff line number Diff line
@@ -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']);
    }

+2 −2
Original line number Diff line number Diff line
@@ -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));
  }