Skip to content

Commit

Permalink
[zend-file-transfer]: use common adapter loader approach
Browse files Browse the repository at this point in the history
  • Loading branch information
glensc committed Jul 9, 2019
1 parent 36425b6 commit 8eeb866
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions packages/zend-file-transfer/library/Zend/File/Transfer.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,9 @@ public function __construct($adapter = 'Http', $direction = false, $options = ar
*/
public function setAdapter($adapter, $direction = false, $options = array())
{
if (Zend_Loader::isReadable('Zend/File/Transfer/Adapter/' . ucfirst($adapter). '.php')) {
if (class_exists('Zend_File_Transfer_Adapter_' . ucfirst($adapter))) {
$adapter = 'Zend_File_Transfer_Adapter_' . ucfirst($adapter);
}

if (!class_exists($adapter)) {
} elseif (!class_exists($adapter)) {
Zend_Loader::loadClass($adapter);
}

Expand Down

0 comments on commit 8eeb866

Please sign in to comment.