From 23670ee92b95312a313eabc4b3e51354c1dbc68b Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Mon, 25 Jul 2011 20:15:22 +0200 Subject: [PATCH] Fixed DirectoryUtil Provided by TimWolla. --- wcfsetup/install/files/lib/util/DirectoryUtil.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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]); } } -- 2.20.1