diff --git a/core/DataTable/Filter/Sort.php b/core/DataTable/Filter/Sort.php
index 6ffe33bcedb412bd436a7fd51c86c5487364b533..95052a1201318b29a939658deacee21f9fd2be1a 100644
--- a/core/DataTable/Filter/Sort.php
+++ b/core/DataTable/Filter/Sort.php
@@ -73,16 +73,8 @@ class Sort extends BaseFilter
      */
     public function numberSort($a, $b)
     {
-        $valA = $a->getColumn($this->columnToSort);
-        $valB = $b->getColumn($this->columnToSort);
-
-        if ($valA === false) {
-            $valA = null;
-        }
-
-        if ($valB === false) {
-            $valB = null;
-        }
+        $valA = $this->getColumnValue($a);
+        $valB = $this->getColumnValue($b);
 
         return !isset($valA)
         && !isset($valB)
@@ -118,16 +110,8 @@ class Sort extends BaseFilter
      */
     function naturalSort($a, $b)
     {
-        $valA = $a->getColumn($this->columnToSort);
-        $valB = $b->getColumn($this->columnToSort);
-
-        if ($valA === false) {
-            $valA = null;
-        }
-
-        if ($valB === false) {
-            $valB = null;
-        }
+        $valA = $this->getColumnValue($a);
+        $valB = $this->getColumnValue($b);
 
         return !isset($valA)
         && !isset($valB)
@@ -153,16 +137,8 @@ class Sort extends BaseFilter
      */
     function sortString($a, $b)
     {
-        $valA = $a->getColumn($this->columnToSort);
-        $valB = $b->getColumn($this->columnToSort);
-
-        if ($valA === false) {
-            $valA = null;
-        }
-
-        if ($valB === false) {
-            $valB = null;
-        }
+        $valA = $this->getColumnValue($a);
+        $valB = $this->getColumnValue($b);
 
         return !isset($valA)
         && !isset($valB)
@@ -179,6 +155,18 @@ class Sort extends BaseFilter
             );
     }
 
+    protected function getColumnValue(Row $table )
+    {
+        $value = $table->getColumn($this->columnToSort);
+
+        if ($value === false
+            || is_array($value)
+        ) {
+            return null;
+        }
+        return $value;
+    }
+
     /**
      * Sets the column to be used for sorting
      *
diff --git a/tests/PHPUnit/Unit/DataTable/Filter/SortTest.php b/tests/PHPUnit/Unit/DataTable/Filter/SortTest.php
index 4aedcb3d7e756f8a06be7828e90cfe30ee062025..64eab67a10352d683c21c7b47737a80dad98c2de 100644
--- a/tests/PHPUnit/Unit/DataTable/Filter/SortTest.php
+++ b/tests/PHPUnit/Unit/DataTable/Filter/SortTest.php
@@ -12,6 +12,9 @@ use Piwik\DataTable\Filter\Sort;
 use Piwik\DataTable;
 use Piwik\DataTable\Row;
 
+/**
+ * @group SortTest
+ */
 class DataTable_Filter_SortTest extends \PHPUnit_Framework_TestCase
 {
     /**
@@ -169,4 +172,20 @@ class DataTable_Filter_SortTest extends \PHPUnit_Framework_TestCase
         $filter->filter($table);
         $this->assertTrue(DataTable::isEqual($table, $expectedtableReverse));
     }
+
+    public function test_sortingArrayValues_doesNotError()
+    {
+        $table = new DataTable();
+        $table->addRowsFromArray(array(
+            array(Row::COLUMNS => array('label' => 'ask', 'count_array' => array(100, 1, 2) )),
+            array(Row::COLUMNS => array('label' => 'nintendo', 'count_array' => array(0, 'hello'))),
+            array(Row::COLUMNS => array('label' => 'yahoo', 'count_array' => array(10, 'test'))
+            )));
+
+        $tableOriginal = clone $table;
+
+        $filter = new Sort($table, 'count_array', 'desc');
+        $filter->filter($table);
+        $this->assertTrue(DataTable::isEqual($tableOriginal, $table));
+    }
 }