Google Groups Home
Help | Sign in
r4120 - branches/0.10/lib
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  1 message - Collapse all
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
no-re...@phpdoctrine.org  
View profile
 More options 26 Mar, 17:56
From: no-re...@phpdoctrine.org
Date: Wed, 26 Mar 2008 17:56:37 +0000
Local: Wed 26 Mar 2008 17:56
Subject: r4120 - branches/0.10/lib
Author: mahono
Date: 2008-03-26 17:56:35 +0000 (Wed, 26 Mar 2008)
New Revision: 4120

Modified:
   branches/0.10/lib/Doctrine.php
Log:
branches/0.10: tweaked is_dir() check in Doctrine::loadModels()

Modified: branches/0.10/lib/Doctrine.php
===================================================================
--- branches/0.10/lib/Doctrine.php      2008-03-26 11:10:45 UTC (rev 4119)
+++ branches/0.10/lib/Doctrine.php      2008-03-26 17:56:35 UTC (rev 4120)
@@ -556,8 +556,12 @@

         $loadedModels = array();

-        if ($directory !== null && is_dir($directory)) {
+        if ($directory !== null) {
             foreach ((array) $directory as $dir) {
+                if (!is_dir($dir)) {
+                    throw new Doctrine_Exception('You must pass a valid path to a directory containing Doctrine models');
+                }
+                
                 $it = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir),
                                                         RecursiveIteratorIterator::LEAVES_ONLY);
                 foreach ($it as $file) {
@@ -589,8 +593,6 @@
                     }
                 }
             }
-        } else {
-          throw new Doctrine_Exception('You must pass a valid path to a directory containing Doctrine models');
         }

         return $loadedModels;


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google