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(
157
157
throw new LocalizedException (__ ("The image doesn't exist. " ));
158
158
}
159
159
160
+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
160
161
$ pathinfo = pathinfo ($ file );
161
162
$ imgExtensions = ['jpg ' , 'jpeg ' , 'gif ' , 'png ' ];
162
163
if (!isset ($ pathinfo ['extension ' ]) || !in_array (strtolower ($ pathinfo ['extension ' ]), $ imgExtensions )) {
@@ -452,6 +453,7 @@ protected function getUniqueFileName($file, $forTmp = false)
452
453
$ destinationFile = $ forTmp
453
454
? $ this ->mediaDirectory ->getAbsolutePath ($ this ->mediaConfig ->getTmpMediaPath ($ file ))
454
455
: $ this ->mediaDirectory ->getAbsolutePath ($ this ->mediaConfig ->getMediaPath ($ file ));
456
+ // phpcs:ignore Magento2.Functions.DiscouragedFunction
455
457
$ destFile = dirname ($ file ) . '/ '
456
458
. \Magento \MediaStorage \Model \File \Uploader::getNewFileName ($ destinationFile );
457
459
}
You can’t perform that action at this time.
0 commit comments