Commit 539a8fcf authored by xiaohua guan's avatar xiaohua guan Committed by Yas Naoi
Browse files

Issue #3282379 by Xiaohua Guan, yas: TypeError: Unsupported operand types:...

Issue #3282379 by Xiaohua Guan, yas: TypeError: Unsupported operand types: string * float in Drupal\aws_cloud\Service\Ec2\Ec2Service->calculateInstanceCost()
parent c3e67241
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -4137,7 +4137,7 @@ class Ec2Service extends CloudServiceBase implements Ec2ServiceInterface {
      $parts = explode(':', $instance_types[$instance_type]);
      $hourly_rate = $parts[4];
      $launch_time = strtotime($instance['LaunchTime']->__toString());
      $cost = round((time() - $launch_time) / 3600 * $hourly_rate, 2);
      $cost = round((time() - $launch_time) / 3600 * floatval($hourly_rate), 2);
    }
    return $cost;
  }