diff --git a/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/OnInsert.php b/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/OnInsert.php index c10547e0b2556..5ac16cf3a7c2c 100644 --- a/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/OnInsert.php +++ b/app/code/Magento/Cms/Controller/Adminhtml/Wysiwyg/Images/OnInsert.php @@ -51,9 +51,9 @@ public function execute() return $resultRaw->setContents( $this->getInsertImageContent->execute( $data['filename'], - (int)$data['store_id'], $data['force_static_path'], - $data['as_is'] + $data['as_is'], + isset($data['store_id']) ? (int) $data['store_id'] : null ) ); } diff --git a/app/code/Magento/Cms/Model/Wysiwyg/Images/GetInsertImageContent.php b/app/code/Magento/Cms/Model/Wysiwyg/Images/GetInsertImageContent.php index 49ef32fffd7a7..e9aab6160b259 100644 --- a/app/code/Magento/Cms/Model/Wysiwyg/Images/GetInsertImageContent.php +++ b/app/code/Magento/Cms/Model/Wysiwyg/Images/GetInsertImageContent.php @@ -41,16 +41,16 @@ public function __construct( * Prepare Image Contents for Insert * * @param string $encodedFilename - * @param int $storeId * @param bool $forceStaticPath * @param bool $renderAsTag + * @param int|null $storeId * @return string */ public function execute( string $encodedFilename, - int $storeId, bool $forceStaticPath, - bool $renderAsTag + bool $renderAsTag, + ?int $storeId = null ): string { $filename = $this->imagesHelper->idDecode($encodedFilename);