summaryrefslogtreecommitdiff
path: root/pages/api.inc
diff options
context:
space:
mode:
authorRaindropsSys <contact@minteck.org>2023-06-02 16:31:02 +0200
committerRaindropsSys <contact@minteck.org>2023-06-02 16:31:02 +0200
commit48afc99d05c7bcd54231f340635f5102a03fbda4 (patch)
treebdad312490ee42b84dde71d5c49266f1b7fc792e /pages/api.inc
parent82ef2e6f4fadb6ed721a0de79ec4d2fcfdc3f426 (diff)
downloadpluralconnect-48afc99d05c7bcd54231f340635f5102a03fbda4.tar.gz
pluralconnect-48afc99d05c7bcd54231f340635f5102a03fbda4.tar.bz2
pluralconnect-48afc99d05c7bcd54231f340635f5102a03fbda4.zip
Updated 7 files, added error.php and deleted 39 files (automated)
Diffstat (limited to 'pages/api.inc')
-rw-r--r--pages/api.inc2
1 files changed, 1 insertions, 1 deletions
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";