From e2acd74cb4d894843845f1f412a93beb3747efa2 Mon Sep 17 00:00:00 2001
From: Marco Pivetta <ocramius@gmail.com>
Date: Thu, 15 Jan 2015 00:37:41 +0100
Subject: [PATCH] #1072 DDC-3191 - minor performance optimization

---
 lib/Doctrine/ORM/Cache/Region/FileLockRegion.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/Doctrine/ORM/Cache/Region/FileLockRegion.php b/lib/Doctrine/ORM/Cache/Region/FileLockRegion.php
index 5994e40cf..083329c55 100644
--- a/lib/Doctrine/ORM/Cache/Region/FileLockRegion.php
+++ b/lib/Doctrine/ORM/Cache/Region/FileLockRegion.php
@@ -204,7 +204,8 @@ class FileLockRegion implements ConcurrentRegion
         // The check below is necessary because on some platforms glob returns false
         // when nothing matched (even though no errors occurred)
         $filenames = glob(sprintf("%s/*.%s" , $this->directory, self::LOCK_EXTENSION));
-        if (is_array($filenames)) {
+
+        if ($filenames) {
             foreach ($filenames as $filename) {
                 @unlink($filename);
             }