Mercurial > hg > isophonics-drupal-site
comparison vendor/symfony/http-foundation/File/UploadedFile.php @ 16:c2387f117808
Routine composer update
author | Chris Cannam |
---|---|
date | Tue, 10 Jul 2018 15:07:59 +0100 |
parents | 1fec387a4317 |
children | 129ea1e6d783 |
comparison
equal
deleted
inserted
replaced
15:e200cb7efeb3 | 16:c2387f117808 |
---|---|
190 return parent::move($directory, $name); | 190 return parent::move($directory, $name); |
191 } | 191 } |
192 | 192 |
193 $target = $this->getTargetFile($directory, $name); | 193 $target = $this->getTargetFile($directory, $name); |
194 | 194 |
195 if (!@move_uploaded_file($this->getPathname(), $target)) { | 195 set_error_handler(function ($type, $msg) use (&$error) { $error = $msg; }); |
196 $error = error_get_last(); | 196 $moved = move_uploaded_file($this->getPathname(), $target); |
197 throw new FileException(sprintf('Could not move the file "%s" to "%s" (%s)', $this->getPathname(), $target, strip_tags($error['message']))); | 197 restore_error_handler(); |
198 if (!$moved) { | |
199 throw new FileException(sprintf('Could not move the file "%s" to "%s" (%s)', $this->getPathname(), $target, strip_tags($error))); | |
198 } | 200 } |
199 | 201 |
200 @chmod($target, 0666 & ~umask()); | 202 @chmod($target, 0666 & ~umask()); |
201 | 203 |
202 return $target; | 204 return $target; |