Fix potenziale #912
This commit is contained in:
parent
bad1886991
commit
eba299658c
|
@ -70,7 +70,7 @@ class Upload extends Model
|
|||
// Creazione file fisico
|
||||
directory($directory);
|
||||
if (
|
||||
(is_uploaded_file($source['tmp_name']) && !move_uploaded_file($source['tmp_name'], $directory.'/'.$filename)) ||
|
||||
(is_array($source) && is_uploaded_file($source['tmp_name']) && !move_uploaded_file($source['tmp_name'], $directory.'/'.$filename)) ||
|
||||
(is_string($source) && !copy($source, $directory.'/'.$filename))
|
||||
) {
|
||||
return null;
|
||||
|
|
|
@ -117,7 +117,7 @@ class Uploads
|
|||
// Creazione file fisico
|
||||
if (
|
||||
!directory($directory) ||
|
||||
(is_uploaded_file($source['tmp_name']) && !move_uploaded_file($source['tmp_name'], $directory.'/'.$filename)) ||
|
||||
(is_array($source) && is_uploaded_file($source['tmp_name']) && !move_uploaded_file($source['tmp_name'], $directory.'/'.$filename)) ||
|
||||
(is_string($source) && !copy($source, $directory.'/'.$filename))
|
||||
) {
|
||||
return null;
|
||||
|
|
Loading…
Reference in New Issue