[BUGFIX] Menu link creation should always return an array
authorXavier Perseguers <xavier@typo3.org>
Thu, 20 Oct 2011 19:56:18 +0000 (21:56 +0200)
committerXavier Perseguers <xavier@typo3.org>
Fri, 21 Oct 2011 07:24:48 +0000 (09:24 +0200)
According to the documentation, method link() returns an array with a
few keys. In case of error however, FALSE is returned which in turn
crashes PHP if the returned value is not post-processed and sent as
this to t3lib_div::implodeAttributes() which forces an array to be
passed as argument.

Change-Id: I7a593dd7eec2bee9e9f84415ccdd592f4d767caf
Fixes: #31079
Related: #17037
Releases: 4.6
Reviewed-on: http://review.typo3.org/6155
Reviewed-by: Philipp Gampe
Reviewed-by: Markus Klein
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer
Reviewed-by: Xavier Perseguers
Tested-by: Xavier Perseguers
typo3/sysext/cms/tslib/class.tslib_menu.php

index bb5ef4b..996302f 100644 (file)
@@ -1188,7 +1188,7 @@ class tslib_menu {
                        }
 
                        if (!is_array($shortcut)) {
-                               return FALSE;
+                               return array();
                        }
 
                                // Only setting url, not target