Skip to content

Commit a35b7c1

Browse files
committed
[FEATURE][DOBO-786] make sure the key extension exists
1 parent a7654a6 commit a35b7c1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Image/Adapter/Gd2.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public function __construct(
4545
public function open($filename)
4646
{
4747
$pathInfo = pathinfo($filename);
48-
if (!key_exists('extension', $pathInfo)
48+
if (key_exists('extension', $pathInfo)
4949
&& in_array($pathInfo['extension'], $this->settings->getExtraFiletypes())
5050
) {
5151
parent::open($filename);
@@ -65,7 +65,7 @@ public function save($destination = null, $newName = null)
6565
{
6666
$fileName = $this->_prepareDestination($destination, $newName);
6767
$pathInfo = pathinfo($fileName);
68-
if (!key_exists('extension', $pathInfo)
68+
if (key_exists('extension', $pathInfo)
6969
&& in_array($pathInfo['extension'], $this->settings->getExtraFiletypes())
7070
) {
7171
parent::save($destination, $newName);

0 commit comments

Comments
 (0)