We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 997ea50 + daa3236 commit 4a5cedcCopy full SHA for 4a5cedc
src/Constants/Constant.php
@@ -110,4 +110,6 @@ class Constant
110
public const ACTION = 'action';
111
112
public const STATUS = 'status';
113
+
114
+ public const DEFAULT_SIZE = '0.00';
115
}
src/Traits/DBConnection.php
@@ -103,14 +103,15 @@ public function getTableSize(string $tableName): string
103
ORDER BY
104
(DATA_LENGTH + INDEX_LENGTH) DESC';
105
$result = DB::select($query);
106
107
if ($result) {
- return $result[0]->size;
108
+ return $result[0]->size ?? Constant::DEFAULT_SIZE;
109
} catch (Exception $exception) {
Log::error($exception->getMessage());
- return Constant::NULL;
+ return Constant::DEFAULT_SIZE;
116
117
/**
0 commit comments