From e44f0cb9376de377b7fb7b48f5ae9c338d7470fe Mon Sep 17 00:00:00 2001 From: Jon Schewe Date: Tue, 7 Sep 2021 06:38:17 -0500 Subject: [PATCH] Fix undefined index error Getting $op is handled at the top of the file, use the same variable at the end of the file to avoid errors about an undefined index. --- backend.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend.php b/backend.php index b2ff46dca..bd24416f6 100644 --- a/backend.php +++ b/backend.php @@ -161,6 +161,6 @@ } header("Content-Type: text/json"); - print Errors::to_json(Errors::E_UNKNOWN_METHOD, [ "info" => (isset($handler) ? get_class($handler) : "UNKNOWN:".$_REQUEST["op"]) . "->$method"]); + print Errors::to_json(Errors::E_UNKNOWN_METHOD, [ "info" => (isset($handler) ? get_class($handler) : "UNKNOWN:".$op) . "->$method"]); ?>