Update: 2026-06-16 17:47:17

This commit is contained in:
Hamza-Ayed
2026-06-16 17:47:19 +03:00
parent 49899da6b2
commit b516fbc4ed
96 changed files with 6073 additions and 3187 deletions

View File

@@ -55,6 +55,7 @@ try {
} catch (PDOException $e) {
// في حال حدوث خطأ في قاعدة البيانات (مثلاً تكرار الإضافة)
jsonError("Database Error: " . $e->getMessage());
error_log("[deletecaptainAccounr] " . $e->getMessage());
jsonError("Database Error");
}
?>

View File

@@ -30,7 +30,8 @@ if ($id && $accountBank && $bankCode) {
} catch (PDOException $e) {
// في حال وجود خطأ في قاعدة البيانات
jsonError("Database Error: " . $e->getMessage());
error_log("[updateShamCashDriver] " . $e->getMessage());
jsonError("Database Error");
}
} else {

View File

@@ -45,5 +45,6 @@ try {
"documents" => $docs
]);
} catch (PDOException $e) {
jsonError("Error: " . $e->getMessage());
error_log("[driver_details] " . $e->getMessage());
jsonError("Error fetching details");
}

View File

@@ -21,5 +21,6 @@ try {
jsonSuccess($rows); // يرجع كـ message: [...]
} catch (PDOException $e) {
jsonError("Error: " . $e->getMessage());
error_log("[drivers_pending_list] " . $e->getMessage());
jsonError("Error fetching data");
}

View File

@@ -22,5 +22,6 @@ try {
}
} catch (PDOException $e) {
jsonError("Database error: " . $e->getMessage());
error_log("[isPhoneVerified] " . $e->getMessage());
jsonError("Database error");
}

View File

@@ -574,7 +574,7 @@ $pwdHashed = password_hash($rawSecret, PASSWORD_DEFAULT);
$con->rollBack();
}
error_log("register_driver_and_car ERROR: " . $e->getMessage());
jsonError("Server error: " . $e->getMessage());
jsonError("Server error");
} catch (PDOException $e) {
if (isset($con) && $con instanceof PDO && $con->inTransaction()) {
$con->rollBack();

View File

@@ -295,7 +295,7 @@ try {
} catch (Exception $e) {
if (isset($con) && $con->inTransaction()) { $con->rollBack(); }
error_log("register_driver_and_car ERROR: " . $e->getMessage());
jsonError("Server error: " . $e->getMessage());
jsonError("Server error");
} catch (PDOException $e) {
if (isset($con) && $con->inTransaction()) { $con->rollBack(); }
error_log("register_driver_and_car PDO: " . $e->getMessage());

View File

@@ -75,6 +75,6 @@ try {
} catch (Exception $e) {
// Log the detailed database error message for debugging.
error_log("[verify_otp.php] FATAL DATABASE ERROR: " . $e->getMessage());
jsonError("Database error: " . $e->getMessage());
jsonError("Database error");
}
?>