From: Matthias Schmidt Date: Tue, 1 Jan 2013 16:16:32 +0000 (+0100) Subject: Fixes bug in StylePackageInstallationPlugin if default style is uninstalled X-Git-Tag: 2.0.0_Beta_1~620^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=aa6230184de8a4b601813b4a892eb7b5749658d6;p=GitHub%2FWoltLab%2FWCF.git Fixes bug in StylePackageInstallationPlugin if default style is uninstalled --- diff --git a/wcfsetup/install/files/lib/system/package/plugin/StylePackageInstallationPlugin.class.php b/wcfsetup/install/files/lib/system/package/plugin/StylePackageInstallationPlugin.class.php index c8c368afe4..1362242a0b 100644 --- a/wcfsetup/install/files/lib/system/package/plugin/StylePackageInstallationPlugin.class.php +++ b/wcfsetup/install/files/lib/system/package/plugin/StylePackageInstallationPlugin.class.php @@ -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(); } }