Skip to content

Commit

Permalink
Merge pull request #41 from experius/feature/DOBO-786
Browse files Browse the repository at this point in the history
Feature/dobo 786
  • Loading branch information
iriks-it authored Jul 3, 2024
2 parents 6771518 + a35b7c1 commit d85d5ea
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Image/Adapter/Gd2.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ public function __construct(
public function open($filename)
{
$pathInfo = pathinfo($filename);
if (!key_exists('extension', $pathInfo)
|| !in_array($pathInfo['extension'], $this->settings->getExtraFiletypes())
if (key_exists('extension', $pathInfo)
&& in_array($pathInfo['extension'], $this->settings->getExtraFiletypes())
) {
parent::open($filename);
}
Expand All @@ -65,8 +65,8 @@ public function save($destination = null, $newName = null)
{
$fileName = $this->_prepareDestination($destination, $newName);
$pathInfo = pathinfo($fileName);
if (!key_exists('extension', $pathInfo)
|| !in_array($pathInfo['extension'], $this->settings->getExtraFiletypes())
if (key_exists('extension', $pathInfo)
&& in_array($pathInfo['extension'], $this->settings->getExtraFiletypes())
) {
parent::save($destination, $newName);
}
Expand Down

0 comments on commit d85d5ea

Please sign in to comment.