Skip to content

Commit 8e1a682

Browse files
Merge pull request #20 from CyberSai/master
Fix Bug with HumanReadableSize Function
2 parents ac5aaf1 + 0ab95e4 commit 8e1a682

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/CloudinaryEngine.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -379,11 +379,11 @@ public function getReadableSize()
379379
private function getHumanReadableSize($sizeInBytes)
380380
{
381381
if ($sizeInBytes >= 1073741824) {
382-
return number_format($bytes / 1073741824, 2) . ' GB';
382+
return number_format($sizeInBytes / 1073741824, 2) . ' GB';
383383
} elseif ($sizeInBytes >= 1048576) {
384-
return number_format($bytes / 1048576, 2) . ' MB';
384+
return number_format($sizeInBytes / 1048576, 2) . ' MB';
385385
} elseif ($sizeInBytes >= 1024) {
386-
return number_format($bytes / 1024, 2) . ' KB';
386+
return number_format($sizeInBytes / 1024, 2) . ' KB';
387387
} elseif ($sizeInBytes > 1) {
388388
return $sizeInBytes . ' bytes';
389389
} elseif ($sizeInBytes == 1) {

0 commit comments

Comments
 (0)