Fixes bug in StylePackageInstallationPlugin if default style is uninstalled
authorMatthias Schmidt <gravatronics@live.com>
Tue, 1 Jan 2013 16:16:32 +0000 (17:16 +0100)
committerMatthias Schmidt <gravatronics@live.com>
Tue, 1 Jan 2013 16:16:32 +0000 (17:16 +0100)
wcfsetup/install/files/lib/system/package/plugin/StylePackageInstallationPlugin.class.php

index c8c368afe47696489bb8acef653686bdcef388ff..1362242a0b3160d56c7d977cc3a93b191bb44e44 100644 (file)
@@ -71,7 +71,7 @@ class StylePackageInstallationPlugin extends AbstractPackageInstallationPlugin {
                        $styles = $styleList->getObjects();
                        
                        if (!empty($styles)) {
-                               $styleEditor = new StyleEditor($styles[0]);
+                               $styleEditor = new StyleEditor(current($styles));
                                $styleEditor->setAsDefault();
                        }
                }