From 3efac5a4f2e8bd5cd0884598244929c2028c1894 Mon Sep 17 00:00:00 2001 From: Lukas Reschke Date: Fri, 24 Oct 2014 00:10:22 +0200 Subject: [PATCH] Prevent division by zero Potentially fixes https://github.com/owncloud/core/issues/11742 --- apps/files/ajax/newfile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files/ajax/newfile.php b/apps/files/ajax/newfile.php index 392fc5bd1c8..b4d91514a2a 100644 --- a/apps/files/ajax/newfile.php +++ b/apps/files/ajax/newfile.php @@ -33,7 +33,7 @@ function progress($notification_code, $severity, $message, $message_code, $bytes case STREAM_NOTIFY_PROGRESS: if ($bytes_transferred > 0) { - if (!isset($filesize)) { + if (!isset($filesize) || $filesize === 0) { } else { $progress = (int)(($bytes_transferred/$filesize)*100); if($progress>$lastsize) { //limit the number or messages send -- 2.39.5