File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
app/code/Magento/Catalog/Model/Product/Gallery Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -157,6 +157,7 @@ public function addImage(
157157 throw new LocalizedException (__ ("The image doesn't exist. " ));
158158 }
159159
160+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
160161 $ pathinfo = pathinfo ($ file );
161162 $ imgExtensions = ['jpg ' , 'jpeg ' , 'gif ' , 'png ' ];
162163 if (!isset ($ pathinfo ['extension ' ]) || !in_array (strtolower ($ pathinfo ['extension ' ]), $ imgExtensions )) {
@@ -452,6 +453,7 @@ protected function getUniqueFileName($file, $forTmp = false)
452453 $ destinationFile = $ forTmp
453454 ? $ this ->mediaDirectory ->getAbsolutePath ($ this ->mediaConfig ->getTmpMediaPath ($ file ))
454455 : $ this ->mediaDirectory ->getAbsolutePath ($ this ->mediaConfig ->getMediaPath ($ file ));
456+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
455457 $ destFile = dirname ($ file ) . '/ '
456458 . \Magento \MediaStorage \Model \File \Uploader::getNewFileName ($ destinationFile );
457459 }
You can’t perform that action at this time.
0 commit comments