Prevent division by zero

Potentially fixes https://github.com/owncloud/core/issues/11742
This commit is contained in:
Lukas Reschke 2014-10-24 00:10:22 +02:00
parent e26a16afea
commit 3efac5a4f2
1 changed files with 1 additions and 1 deletions

View File

@ -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