Skip to content

Commit

Permalink
[WebBundle] removed unneeded code
Browse files Browse the repository at this point in the history
  • Loading branch information
fabpot committed Apr 20, 2010
1 parent ffc8964 commit f6a2b74
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/Symfony/Framework/WebBundle/Util/Mustache.php
Expand Up @@ -34,11 +34,6 @@ static public function renderDir($dir, $parameters)
{
foreach (new \RecursiveIteratorIterator(new \RecursiveDirectoryIterator($dir), \RecursiveIteratorIterator::LEAVES_ONLY) as $file)
{
if ($file instanceof \DirectoryIterator && $file->isDot())
{
continue;
}

static::renderFile((string) $file, $parameters);
}
}
Expand Down

2 comments on commit f6a2b74

@dasher
Copy link

@dasher dasher commented on f6a2b74 Jun 17, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With PHP 5.3.2 on Ubuntu you still need a file check to see if you have a file or a folder - leaves only returns the current "." folder.

    if ($file->isFile()) {
            static::renderFile((string) $file, $parameters);                
    }

@jmikola
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I had also fixed this in a local fork last month, as the code was consistently breaking on our Linux machines. I submitted a pull request back then, but it wasn't picked up - I'll try again.

http://github.com/opensky/symfony/commit/aa70df9c9014335699ef4f5fbdb74002b4b8e3c9

My guess is that the Symfony devs are mostly using Macs, where "." isn't returned as a leaf (an obscure platform difference).

Please sign in to comment.