Development

Changeset 10009

You must first sign up to be able to contribute.

Changeset 10009

Show
Ignore:
Timestamp:
06/30/08 07:31:40 (6 years ago)
Author:
dwhittle
Message:

1.1: fixed possible notice in sfSimpleAutoload

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.1/lib/autoload/sfSimpleAutoload.class.php

    r9075 r10009  
    183183  { 
    184184    $finder = sfFinder::type('file')->follow_link()->name('*'.$ext); 
    185     foreach (glob($dir) as $dir
    186     { 
    187       if (in_array($dir, $this->dirs)
     185    if($dirs = glob($dir)
     186    { 
     187      foreach ($dirs as $dir
    188188      { 
    189         if ($this->cacheLoaded
     189        if (in_array($dir, $this->dirs)
    190190        { 
    191           continue; 
     191          if ($this->cacheLoaded) 
     192          { 
     193            continue; 
     194          } 
    192195        } 
     196        else 
     197        { 
     198          $this->dirs[] = $dir; 
     199        } 
     200 
     201        $this->cacheChanged = true; 
     202        $this->addFiles($finder->in($dir), false); 
    193203      } 
    194       else 
    195       { 
    196         $this->dirs[] = $dir; 
    197       } 
    198  
    199       $this->cacheChanged = true; 
    200       $this->addFiles($finder->in($dir), false); 
    201204    } 
    202205  }