]> git.nbdom.net Git - nb.git/commitdiff
fix bug when $_SERVER['REQUEST_METHOD'] is empty
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 26 Aug 2024 21:09:47 +0000 (23:09 +0200)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Mon, 26 Aug 2024 21:09:47 +0000 (23:09 +0200)
www/dbq/dbq.php

index 957c15b7a5405c904d4867b3a470727a34fcb45c..b10b76d777d8a76cffa8042c3a1a0bc516b2347b 100644 (file)
@@ -483,8 +483,8 @@ class DbQ extends nb {
                if (!$keys) $keys = $all;
                $keys = array_keys($keys);
 
-               $values = ($_SERVER['REQUEST_METHOD'] == 'POST') ? $_POST : explode($this->param_args_sep,$this->params['args']);
-               if ($_SERVER['REQUEST_METHOD'] == 'POST') {
+               # NB 26.08.24 $values = ($_SERVER['REQUEST_METHOD'] == 'POST') ? $_POST : explode($this->param_args_sep,$this->params['args']);
+               if (!empty($_SERVER['REQUEST_METHOD']) and $_SERVER['REQUEST_METHOD'] == 'POST') {
                        $values = $_POST;
                } elseif($this->params['args']) {
                        $values = explode($this->param_args_sep,$this->params['args']);