Compare commits

..

No commits in common. "stable" and "3.3.1" have entirely different histories.

View File

@ -493,8 +493,6 @@ class database
/** /**
* Count * Count
* *
* @throws exception_runtime If the database is corrupted (counting result is float)
*
* @return int Amount of records * @return int Amount of records
*/ */
public function count(): int public function count(): int
@ -502,11 +500,8 @@ class database
// Deleting the database file cache // Deleting the database file cache
clearstatcache(true, $this->database); clearstatcache(true, $this->database);
// Counting // Exit (success)
$amount = $this->length > 0 && file_exists($this->database) ? filesize($this->database) / $this->length : 0; return $this->length > 0 && file_exists($this->database) ? filesize($this->database) / $this->length : 0;
// Exit (success/fail)
return is_int($amount) ? $amount : throw new exception_runtime('The database is corrupted');
} }
/** /**