Fixed broken package info issues
authorMarcel Werk <burntime@woltlab.com>
Mon, 13 Jan 2014 22:13:56 +0000 (23:13 +0100)
committerMarcel Werk <burntime@woltlab.com>
Mon, 13 Jan 2014 22:13:56 +0000 (23:13 +0100)
wcfsetup/install/files/lib/system/package/PackageArchive.class.php

index 5c1029f53d6b9fbbce6749309b3d09b30514f7b0..032f701d4c95e13b81e1a72c84123f51d1008ec3 100644 (file)
@@ -495,7 +495,7 @@ class PackageArchive {
         * Returns a localized information about this package.
         * 
         * @param       string          $name
-        * @return      mixed
+        * @return      string
         */
        public function getLocalizedPackageInfo($name) {
                if (isset($this->packageInfo[$name][WCF::getLanguage()->getFixedLanguageCode()])) {
@@ -505,7 +505,11 @@ class PackageArchive {
                        return $this->packageInfo[$name]['default'];
                }
                
-               return $this->getPackageInfo($name);
+               if (!empty($this->packageInfo[$name])) {
+                       return reset($this->packageInfo[$name]);
+               }
+               
+               return '';
        }
        
        /**