Commit fc62d12d authored by Yas Naoi's avatar Yas Naoi
Browse files

Issue #3266025 by yas, Xiaohua Guan: Fix an error: Object of class...

Issue #3266025 by yas, Xiaohua Guan: Fix an error: Object of class Aws\Api\DateTimeResult could not be converted to int in Drupal\Core\Entity\Sql\SqlContentEntityStorageSchema::castValue()
parent 25870164
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
@@ -234,13 +234,16 @@ class VolumeCreateForm extends AwsCloudContentForm {
      return;
    }

    $entity->setVolumeId($result['VolumeId']);
    $entity->setCreated($result['CreateTime']);
    $entity->setState($result['State']);
    $entity->setSnapshotName($this->getSnapshotName($entity->getCloudContext(), $entity->getSnapshotId(), $this->getModuleName($entity)));
    $entity->setVolumeType($result['VolumeType']);
    if(!($entity->setVolumeId($result['VolumeId'])
      && $entity->setCreated(strtotime($result['CreateTime']))
      && $entity->setState($result['State'])
      && $entity->setSnapshotName($this->getSnapshotName($entity->getCloudContext(), $entity->getSnapshotId(), $this->getModuleName($entity)))
      && $entity->setVolumeType($result['VolumeType'])
      && $entity->save())) {

    $entity->save();
      $this->processOperationErrorStatus($entity, 'created');
      return;
    }

    $this->updateNameAndCreatedByTags($entity, $entity->getVolumeId());