summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLee Rowlands2017-12-27 08:07:19 (GMT)
committerLee Rowlands2017-12-27 08:07:19 (GMT)
commit6585630775fd1d1f276b7a3747eac405554ff8df (patch)
tree71553e1f13b5dc77ece83bc24a6cd815edaff482
parent984a268454fabfe0a84a25cf3c4db24459d51a8d (diff)
Issue #2931709 by marcoscano, claudiu.cristea: Wrong constant name in \Drupal\image\Plugin\Field\FieldType\ImageItem::generateSampleValue()
-rw-r--r--core/modules/image/src/Plugin/Field/FieldType/ImageItem.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/modules/image/src/Plugin/Field/FieldType/ImageItem.php b/core/modules/image/src/Plugin/Field/FieldType/ImageItem.php
index 14335d8..67a15a7 100644
--- a/core/modules/image/src/Plugin/Field/FieldType/ImageItem.php
+++ b/core/modules/image/src/Plugin/Field/FieldType/ImageItem.php
@@ -344,7 +344,7 @@ class ImageItem extends FileItem {
if (!isset($images[$extension][$min_resolution][$max_resolution]) || count($images[$extension][$min_resolution][$max_resolution]) <= 5) {
$tmp_file = drupal_tempnam('temporary://', 'generateImage_');
$destination = $tmp_file . '.' . $extension;
- file_unmanaged_move($tmp_file, $destination, FILE_CREATE_DIRECTORY);
+ file_unmanaged_move($tmp_file, $destination);
if ($path = $random->image(\Drupal::service('file_system')->realpath($destination), $min_resolution, $max_resolution)) {
$image = File::create();
$image->setFileUri($path);
@@ -354,7 +354,7 @@ class ImageItem extends FileItem {
$destination_dir = static::doGetUploadLocation($settings);
file_prepare_directory($destination_dir, FILE_CREATE_DIRECTORY);
$destination = $destination_dir . '/' . basename($path);
- $file = file_move($image, $destination, FILE_CREATE_DIRECTORY);
+ $file = file_move($image, $destination);
$images[$extension][$min_resolution][$max_resolution][$file->id()] = $file;
}
else {