@@ -112,7 +112,7 @@ |
||
112 | 112 | { |
113 | 113 | // remove leading slash |
114 | 114 | return (substr($this->path, 0, 1) == '/' ? substr($this->path, 1) : $this->path) |
115 | - . (substr($this->path, -1, 1) == '/' ? '' : '/') |
|
116 | - . $target->getFilename(); |
|
115 | + . (substr($this->path, -1, 1) == '/' ? '' : '/') |
|
116 | + . $target->getFilename(); |
|
117 | 117 | } |
118 | 118 | } |
@@ -62,8 +62,8 @@ discard block |
||
62 | 62 | { |
63 | 63 | $s3->registerStreamWrapper(); |
64 | 64 | $source = $this->getFileHandle($target->getPathname(), 'r'); |
65 | - $stream = $this->getFileHandle('s3://' . $this->bucket . '/' . $this->getUploadPath($target), 'w'); |
|
66 | - while(!feof($source)) { |
|
65 | + $stream = $this->getFileHandle('s3://'.$this->bucket.'/'.$this->getUploadPath($target), 'w'); |
|
66 | + while (!feof($source)) { |
|
67 | 67 | fwrite($stream, fread($source, 4096)); |
68 | 68 | } |
69 | 69 | fclose($stream); |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | { |
98 | 98 | $handle = fopen($path, $mode); |
99 | 99 | if (!is_resource($handle)) { |
100 | - throw new Exception('fopen failed: could not open stream ' . $path); |
|
100 | + throw new Exception('fopen failed: could not open stream '.$path); |
|
101 | 101 | } |
102 | 102 | return $handle; |
103 | 103 | } |