From 07cb5f83e82111b8d2f84b5d1f800b12d72d7d16 Mon Sep 17 00:00:00 2001 From: Alan Date: Wed, 15 Mar 2023 14:43:00 +0800 Subject: [PATCH] better value checking --- Pman/Roo.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Pman/Roo.php b/Pman/Roo.php index 83bf522..344bbb0 100644 --- a/Pman/Roo.php +++ b/Pman/Roo.php @@ -754,11 +754,11 @@ class Pman_Roo extends Pman { // Db_DataObject::debugLevel(1); - $sort = empty($_REQUEST['sort']) ? $sort : $_REQUEST['sort']; - $dir = empty($_REQUEST['dir']) ? $dir : $_REQUEST['dir']; + $sort = empty($_REQUEST['sort']) || !is_string($_REQUEST['sort']) ? $sort : $_REQUEST['sort']; + $dir = empty($_REQUEST['dir']) || !is_string($_REQUEST['dir']) ? $dir : $_REQUEST['dir']; $dir = $dir == 'ASC' ? 'ASC' : 'DESC'; - $ms = empty($_REQUEST['_multisort']) ? false : $_REQUEST['_multisort']; + $ms = empty($_REQUEST['_multisort']) || !is_string($_REQUEST['_multisort']) ? false : $_REQUEST['_multisort']; //var_Dump($ms);exit; $sorted = false; if (method_exists($x, 'applySort')) { -- 2.39.2