From 48afc99d05c7bcd54231f340635f5102a03fbda4 Mon Sep 17 00:00:00 2001 From: RaindropsSys Date: Fri, 2 Jun 2023 16:31:02 +0200 Subject: Updated 7 files, added error.php and deleted 39 files (automated) --- pages/api.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'pages/api.inc') diff --git a/pages/api.inc b/pages/api.inc index 418df76..8bcea02 100644 --- a/pages/api.inc +++ b/pages/api.inc @@ -7,7 +7,7 @@ if (str_ends_with($_GET['_'], "/")) { } $toplevel = explode("/", $pagename)[1]; -$middlelevel = explode("/", $pagename)[2]; +$middlelevel = explode("/", $pagename)[2] ?? null; if (isset($middlelevel) && file_exists($_SERVER['DOCUMENT_ROOT'] . "/pages/api/" . $toplevel . "/" . $middlelevel . ".php") && is_file($_SERVER['DOCUMENT_ROOT'] . "/pages/api/" . $toplevel . "/" . $middlelevel . ".php")) { require_once $_SERVER['DOCUMENT_ROOT'] . "/pages/api/" . $toplevel . "/" . $middlelevel . ".php"; -- cgit