Skip to content
This repository has been archived by the owner on Jan 30, 2020. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/Encrypt.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,14 @@ public function setAdapter($options = null)
$options = array();
}

if (file_exists(__DIR__ . '/Encrypt/' . ucfirst($adapter) . '.php')) {
$adapter = 'Zend\\Filter\\Encrypt\\' . ucfirst($adapter);
}

if (!class_exists($adapter)) {
if (class_exists('Zend\Filter\Encrypt\\' . ucfirst($adapter))) {
$adapter = 'Zend\Filter\Encrypt\\' . ucfirst($adapter);
} elseif (!class_exists($adapter)) {
throw new Exception\DomainException(
sprintf('%s expects a valid registry class name; received "%s", which did not resolve',
__METHOD__,
$adapter
));
__METHOD__,
$adapter
));
}

$this->adapter = new $adapter($options);
Expand Down

0 comments on commit 6e30cb0

Please sign in to comment.