From c4bd1858db32aed8b905c1934ea2976ee450928c Mon Sep 17 00:00:00 2001 From: Andrew Nicols Date: Wed, 27 May 2020 11:16:22 +0800 Subject: [PATCH] MDL-67743 table: Sort direction is an integer --- lib/tablelib.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tablelib.php b/lib/tablelib.php index 79052b3a86b..8e28ab497e1 100644 --- a/lib/tablelib.php +++ b/lib/tablelib.php @@ -1503,7 +1503,7 @@ class flexible_table { $this->sortdata = []; foreach ($sortdata as $sortitem) { if (!array_key_exists($sortitem['sortby'], $this->sortdata)) { - $this->sortdata[$sortitem['sortby']] = $sortitem['sortorder']; + $this->sortdata[$sortitem['sortby']] = (int) $sortitem['sortorder']; } } }