Prevent division by zero
Potentially fixes https://github.com/owncloud/core/issues/11742
This commit is contained in:
parent
e26a16afea
commit
3efac5a4f2
1 changed files with 1 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue