From faa490e1c1e3e2d9d20a74e329e89f742fc5e121 Mon Sep 17 00:00:00 2001 From: Michael Babker Date: Fri, 17 Oct 2014 12:58:13 -0400 Subject: [PATCH] Call to undefined method --- .../PatchTester/Controller/DisplayController.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/administrator/components/com_patchtester/PatchTester/Controller/DisplayController.php b/administrator/components/com_patchtester/PatchTester/Controller/DisplayController.php index 2bab3bb..d3984d4 100644 --- a/administrator/components/com_patchtester/PatchTester/Controller/DisplayController.php +++ b/administrator/components/com_patchtester/PatchTester/Controller/DisplayController.php @@ -151,10 +151,13 @@ class DisplayController extends \JControllerBase // Check if the ordering field is in the white list, otherwise use the incoming value. $value = $this->getApplication()->getUserStateFromRequest($this->context . '.ordercol', 'filter_order', $this->defaultOrderColumn); - if (!in_array($value, $model->getSortFields())) + if (method_exists($model, 'getSortFields')) { - $value = $this->defaultOrderColumn; - $this->getApplication()->setUserState($this->context . '.ordercol', $value); + if (!in_array($value, $model->getSortFields())) + { + $value = $this->defaultOrderColumn; + $this->getApplication()->setUserState($this->context . '.ordercol', $value); + } } $state->set('list.ordering', $value);