Browse Source

Add check to avoid treating non-numerical indexes in sorteable tables

Yannick Warnier 8 years ago
parent
commit
528f9e01fe
1 changed files with 4 additions and 0 deletions
  1. 4 0
      main/inc/lib/pear/HTML/Table/Storage.php

+ 4 - 0
main/inc/lib/pear/HTML/Table/Storage.php

@@ -838,6 +838,10 @@ class HTML_Table_Storage extends HTML_Common
     {
         $colspan = isset($attributes['colspan']) ? $attributes['colspan'] : 1;
         $rowspan = isset($attributes['rowspan']) ? $attributes['rowspan'] : 1;
+        if (!is_numeric($row) or !is_numeric($col)) {
+            //throw new Exception('Row or column index is not numerical');
+            return;
+        }
         if (($row + $rowspan - 1) >= $this->_rows) {
             if ($this->_autoGrow) {
                 $this->_rows = $row + $rowspan;