Fixed search issue
authorMarcel Werk <burntime@woltlab.com>
Wed, 23 Apr 2014 19:57:43 +0000 (21:57 +0200)
committerMarcel Werk <burntime@woltlab.com>
Wed, 23 Apr 2014 19:57:43 +0000 (21:57 +0200)
wcfsetup/install/files/lib/page/SearchResultPage.class.php

index e6cbcd3bf257198b4b8fcc426ad2fe07f4ad2b6e..07453a94dc07b79424f5a52c0b8866e4ae0b3d8b 100644 (file)
@@ -101,7 +101,7 @@ class SearchResultPage extends MultipleLinkPage {
                
                // set active menu item
                if (isset($this->searchData['selectedObjectTypes']) && count($this->searchData['selectedObjectTypes']) == 1) {
-                       $objectType = SearchEngine::getInstance()->getObjectType($this->searchData['selectedObjectTypes'][0]);
+                       $objectType = SearchEngine::getInstance()->getObjectType(reset($this->searchData['selectedObjectTypes']));
                        if (($activeMenuItem = $objectType->getActiveMenuItem())) {
                                PageMenu::getInstance()->setActiveMenuItem($activeMenuItem);
                        }