From: Matthias Schmidt Date: Mon, 25 Jul 2011 18:15:22 +0000 (+0200) Subject: Fixed DirectoryUtil X-Git-Tag: 2.0.0_Beta_1~1957^2~1 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=23670ee92b95312a313eabc4b3e51354c1dbc68b;p=GitHub%2FWoltLab%2FWCF.git Fixed DirectoryUtil Provided by TimWolla. --- diff --git a/wcfsetup/install/files/lib/util/DirectoryUtil.class.php b/wcfsetup/install/files/lib/util/DirectoryUtil.class.php index a66d51f531..1d184936ad 100644 --- a/wcfsetup/install/files/lib/util/DirectoryUtil.class.php +++ b/wcfsetup/install/files/lib/util/DirectoryUtil.class.php @@ -152,7 +152,7 @@ class DirectoryUtil { // sort out non matching files if (!empty($pattern)) { foreach ($files as $filename => $value) { - if (preg_match($pattern, $filename) != $negativeMatch) unset($files[$filename]); + if (((bool) preg_match($pattern, $filename)) == $negativeMatch) unset($objects[$filename]); } } @@ -188,7 +188,7 @@ class DirectoryUtil { // sort out non matching files if (!empty($pattern)) { foreach ($objects as $filename => $value) { - if (preg_match($pattern, $filename) != $negativeMatch) unset($objects[$filename]); + if (((bool) preg_match($pattern, $filename)) == $negativeMatch) unset($objects[$filename]); } }