Use it the way RouL suggested.
authorTim Düsterhus <timwolla@googlemail.com>
Sat, 16 Jul 2011 15:19:23 +0000 (08:19 -0700)
committerTim Düsterhus <timwolla@googlemail.com>
Sat, 16 Jul 2011 15:19:23 +0000 (08:19 -0700)
wcfsetup/install/files/lib/util/DirectoryUtil.class.php

index 6e01af6d5e3dfad5c49ad48cf84b25e45d61271c..315d6820a89af391346fe87508865f87ccb14181 100644 (file)
@@ -149,7 +149,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 (preg_match($pattern, $filename) != $negativeMatch) unset($files[$filename]);
                        }
                }
 
@@ -185,7 +185,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 (preg_match($pattern, $filename) != $negativeMatch) unset($objects[$filename]);
                        }
                }