From 62cfbded62c3fe747ff708f4f0996e17e50659db Mon Sep 17 00:00:00 2001 From: Mattias Michaux Date: Tue, 3 May 2016 21:19:08 +0200 Subject: [PATCH] PHP warning fix. --- CRM/Core/Page/AJAX.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/CRM/Core/Page/AJAX.php b/CRM/Core/Page/AJAX.php index 7c4537eecd..84185152f1 100644 --- a/CRM/Core/Page/AJAX.php +++ b/CRM/Core/Page/AJAX.php @@ -220,9 +220,11 @@ class CRM_Core_Page_AJAX { ); $sortMapper = array(); - foreach ($_GET['columns'] as $key => $value) { - $sortMapper[$key] = CRM_Utils_Type::validate($value['data'], 'MysqlColumnName'); - }; + if (isset($_GET['columns'])) { + foreach ($_GET['columns'] as $key => $value) { + $sortMapper[$key] = CRM_Utils_Type::validate($value['data'], 'MysqlColumnName'); + }; + } $offset = isset($_GET['start']) ? CRM_Utils_Type::validate($_GET['start'], 'Integer') : $defaultOffset; $rowCount = isset($_GET['length']) ? CRM_Utils_Type::validate($_GET['length'], 'Integer') : $defaultRowCount; -- 2.25.1