From: Mattias Michaux Date: Tue, 3 May 2016 19:19:08 +0000 (+0200) Subject: PHP warning fix. X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=62cfbded62c3fe747ff708f4f0996e17e50659db;p=civicrm-core.git PHP warning fix. --- 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;