From 9409ca655cf489a2b286b0365fd5e59d47dbe000 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Vo=C5=99=C3=AD=C5=A1ek?= Date: Tue, 26 Sep 2023 11:11:22 +0200 Subject: [PATCH] replace remaining $_GET/$_POST --- demos/others/sticky2.php | 2 +- src/Form.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/demos/others/sticky2.php b/demos/others/sticky2.php index fb0b911952..eb82d58426 100644 --- a/demos/others/sticky2.php +++ b/demos/others/sticky2.php @@ -53,7 +53,7 @@ $frame = View::addTo($app, ['ui' => 'green segment']); Button::addTo($frame, ['does not inherit sticky get']) ->on('click', static function () use ($app) { - return new JsToast('$_GET = ' . $app->encodeJson($_GET)); + return new JsToast('$_GET = ' . $app->encodeJson($app->getRequest()->getQueryParams())); }); Header::addTo($app, ['Use of View::url()']); diff --git a/src/Form.php b/src/Form.php index e5bd4e4317..5182e4f844 100644 --- a/src/Form.php +++ b/src/Form.php @@ -436,7 +436,7 @@ public function controlFactory(Field $field, $controlSeed = []): Control */ protected function loadPost(): void { - $postRawData = $_POST; + $postRawData = $this->getApp()->getRequest()->getParsedBody(); $this->hook(self::HOOK_LOAD_POST, [&$postRawData]); $errors = [];