From 595ae99e1debff82fa87d0cd8054a041d15c7f19 Mon Sep 17 00:00:00 2001 From: Hamza-Ayed Date: Fri, 26 Jun 2026 00:41:47 +0300 Subject: [PATCH] Update: 2026-06-26 00:41:47 --- backend/test_add_driver_and_car.php | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/backend/test_add_driver_and_car.php b/backend/test_add_driver_and_car.php index a56e4d25..0636d76c 100644 --- a/backend/test_add_driver_and_car.php +++ b/backend/test_add_driver_and_car.php @@ -15,14 +15,10 @@ require_once __DIR__ . '/core/bootstrap.php'; header('Content-Type: application/json; charset=utf-8'); -// دعم JSON body بالإضافة إلى POST/GET +// دمج GET + POST + JSON body $rawBody = file_get_contents('php://input'); -if ($rawBody) { - $json = json_decode($rawBody, true); - if ($json) { - $_POST = array_merge($_POST, $json); - } -} +$json = $rawBody ? json_decode($rawBody, true) : []; +$_POST = array_merge($_GET, $_POST, $json ?: []); try { /* ================== قراءة المدخلات ================== */