mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
use loose comparison instead of strict comparison (#7064)
Update comparison checks when testing the database status and add a unified log message with a more detailed message from the database when there is a failure Authored-by: Tim Fry <tim@fusionpbx.com>
This commit is contained in:
@@ -304,7 +304,7 @@ if (!class_exists('users')) {
|
||||
$database->execute($sql);
|
||||
$code = $database->message['code'] ?? 0;
|
||||
if ($code == 200) {
|
||||
maintenance_service::log_write(self::class, "Removed database entries older than $retention_days", $domain_uuid);
|
||||
maintenance_service::log_write(self::class, "Successfully removed entries older than $retention_days", $domain_uuid);
|
||||
} else {
|
||||
$message = $database->message['message'] ?? "An unknown error has occurred";
|
||||
maintenance_service::log_write(self::class, "Unable to remove old database records. Error message: $message ($code)", $domain_uuid, maintenance_service::LOG_ERROR);
|
||||
|
||||
Reference in New Issue
Block a user