From e472b8bbc47b4b9e3390b7d7428f3c6af3804239 Mon Sep 17 00:00:00 2001 From: Simon Vikstrom Date: Fri, 6 Mar 2020 05:55:17 +0000 Subject: [PATCH] Fix "Uncaught TypeError: urlencode() expects parameter 1 to be string, int given in" If a user creates two tables prefixed with number__... like 2020__abc 2020__cde then phpmyadmin will group then, the key will end up being an integer instead of a string and PHP will error out on it. Signed-off-by: Simon Vikstrom --- libraries/classes/Navigation/NavigationTree.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/classes/Navigation/NavigationTree.php b/libraries/classes/Navigation/NavigationTree.php index c5046a2603..294626b7a0 100644 --- a/libraries/classes/Navigation/NavigationTree.php +++ b/libraries/classes/Navigation/NavigationTree.php @@ -799,7 +799,7 @@ class NavigationTree if ($node instanceof NodeTableContainer || $node instanceof NodeViewContainer ) { - $tblGroup = '&tbl_group=' . urlencode($key); + $tblGroup = '&tbl_group=' . urlencode((string) $key); $groups[$key]->links = [ 'text' => $node->links['text'] . $tblGroup, 'icon' => $node->links['icon'] . $tblGroup,