[Typo3-dev] Reason for checking if file exists

Michael Stucki michael at typo3.org
Thu Jul 14 15:02:25 CEST 2005


While solving a problem with indexed_search I found many of these calls:

if (ini_get('safe_mode') || @is_file($catdocPath.'catdoc'.$exe))        ....

First of all: The problem is that this won't work if open_basedir is set but
doesn't include the path to that program - although it is executable!

Basically the fix is very easy: Just do it the same way like in safe_mode
and pass the check if open_basedir is set.

But then I wonder if there is any reason to check if a file exists?!
Does it hurt if I just try to execute/index/etc. a file that doesn't exist?

- michael
-- 
Use a newsreader! Check out
http://typo3.org/community/mailing-lists/use-a-news-reader/




More information about the TYPO3-dev mailing list