From 9ff9600c856699aa4dc393280e2a52709bd2cbac Mon Sep 17 00:00:00 2001 From: Nexis81 Date: Fri, 1 Jul 2022 11:27:47 -0700 Subject: [PATCH] Update index.php Fixing case issues with headers and class files. --- ost_wbs/index.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ost_wbs/index.php b/ost_wbs/index.php index 4304961..76185e2 100644 --- a/ost_wbs/index.php +++ b/ost_wbs/index.php @@ -17,7 +17,7 @@ // Autoload class files spl_autoload_register( function ( $class ) { - require_once 'classes/class.' . lcfirst($class) . '.php'; + require_once 'classes/class.' . strtolower($class) . '.php'; }); // Main Class @@ -26,7 +26,7 @@ class OSTicketAPI public static function open($request) { // Header - $key = array("apikey" => getallheaders()["apikey"]); + $key = array("apikey" => array_change_key_case(getallheaders()), CASE_LOWER)["apikey"]; // Body $requestBody = json_decode(file_get_contents('php://input'), true);