[TYPO3-core] RFC #2642: Bug: Directories named 0 break directory listing and you cannnot create a directory with name 0

Dmitry Dulepov [typo3] dmitry at typo3.org
Mon Sep 1 19:00:05 CEST 2008


Hi!

Rob Vonk wrote:
> Problem:
> 
> If a folder contains a subfolder which has a name '0' (zero) readdir 
> fails to read directory. You cannot create a directory with name '0' 
> (zero).
> 
> Solution:
> 
> Use this method of reading the directory: while (false !== ($entry = 
> $d->read())) instead of: while($entry=$d->read())
> 
> Use this method to check if directory is entered: if (isset($theFolder)) 
> instead of: if ($theFolder)

Committed to trunk and 4.2

-- 
Dmitry Dulepov
TYPO3 Core team
My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book
In the blog: http://typo3bloke.net/pages/book-reviews/presentation-zen-by-garr-reynolds/


More information about the TYPO3-team-core mailing list