Skip to content
Snippets Groups Projects
Commit 39d6d705 authored by Patrick Barroca's avatar Patrick Barroca :grin: Committed by gloas
Browse files

Fix #12295 : compatibility with PHP's rename() function not able to return...

Fix #12295 : compatibility with PHP's rename() function not able to return success status with Moulins server file system
parent 32a6f6f3
Branches
Tags
2 merge requests!258Dev/13872 Orphee Allow Hold Available Items,!4dev#12091 Moulins portail jeunesse
......@@ -28,7 +28,8 @@ class Class_UploadMover_LocalFile extends Class_UploadMover_Abstract {
* @return bool
*/
public function moveTo($source, $destination) {
if (!rename($source, $destination)) {
@rename($source, $destination);
if (!file_exists($destination)) {
$this->setError(sprintf($this->_('Impossible d\'écrire le fichier sur le serveur au chemin [%s]'), $destination));
return false;
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment