From 641929ac124f5167f2338c91421044a9fb983940 Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Thu, 17 Jun 2021 13:41:06 +0200 Subject: [PATCH] Phalcon 4.x fixes. closes https://github.com/opnsense/ui_devtools/issues/5 --- stubs/api.php | 3 +-- stubs/index.php | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/stubs/api.php b/stubs/api.php index ca31461..80158c5 100644 --- a/stubs/api.php +++ b/stubs/api.php @@ -56,8 +56,7 @@ try { * Handle the request */ $application = new \Phalcon\Mvc\Application($di); - echo $application->handle()->getContent(); - + echo $application->handle($_SERVER['REQUEST_URI'])->getContent(); } catch (\Exception $e) { $response = array(); $response['errorMessage'] = $e->getMessage(); diff --git a/stubs/index.php b/stubs/index.php index ce19ae6..7301808 100644 --- a/stubs/index.php +++ b/stubs/index.php @@ -111,8 +111,7 @@ try { // always flush caches for local testing (new \OPNsense\Base\Menu\MenuSystem())->invalidateCache(); (new \OPNsense\Core\ACL())->invalidateCache(); - echo $application->handle()->getContent(); - + echo $application->handle($_SERVER['REQUEST_URI'])->getContent(); } catch (\Exception $e) { echo $e->getMessage(); echo '
' . $e->getTraceAsString() . '
';