GlobIterator() is PHP 5.3 only.
authorJan Schneider <jan@horde.org>
Mon, 10 May 2010 14:15:52 +0000 (15:15 +0100)
committerJan Schneider <jan@horde.org>
Mon, 10 May 2010 14:27:00 +0000 (16:27 +0200)
framework/Alarm/lib/Horde/Alarm.php

index c3bc11e..eeca860 100644 (file)
@@ -504,8 +504,8 @@ abstract class Horde_Alarm
     public function handlers()
     {
         if (!$this->_handlersLoaded) {
-            foreach (new GlobIterator(dirname(__FILE__) . '/Alarm/Handler/*.php') as $file) {
-                if (!$file->isFile()) {
+            foreach (new DirectoryIterator(dirname(__FILE__) . '/Alarm/Handler') as $file) {
+                if (!$file->isFile() || substr($file->getFilename(), -4) != '.php') {
                     continue;
                 }
                 $handler = Horde_String::lower($file->getBasename('.php'));