Skip to content

Commit c667294

Browse files
committed
remove overloading to prevent inheritance compatibility, fixes #16
1 parent 6e06cbd commit c667294

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

bridges/php/handler.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,17 +99,17 @@ public function setHeaders($params)
9999

100100
class FileManager extends Ftp
101101
{
102-
public function download($path)
102+
public function downloadTemp($path)
103103
{
104104
$localPath = tempnam(sys_get_temp_dir(), 'fmanager_');
105-
if (parent::download($path, $localPath)) {
105+
if ($this->download($path, $localPath)) {
106106
return $localPath;
107107
}
108108
}
109109

110110
public function getContent($path)
111111
{
112-
$localPath = $this->download($path);
112+
$localPath = $this->downloadTemp($path);
113113
if ($localPath) {
114114
return @file_get_contents($localPath);
115115
}
@@ -154,7 +154,7 @@ public function getContent($path)
154154
$filePath = Request::getQuery('path');
155155
$fileName = explode('/', $filePath);
156156
$fileName = end($fileName);
157-
$tmpFilePath = $oFtp->download($filePath);
157+
$tmpFilePath = $oFtp->downloadTemp($filePath);
158158
if ($fileContent = @file_get_contents($tmpFilePath)) {
159159
$oResponse->setData($fileContent);
160160
$oResponse->setHeaders(array(

0 commit comments

Comments
 (0)