[TYPO3-core] FYI24: #8826: calls to ini_set produces warnings

Ingo Renner ingo at typo3.org
Tue Sep 2 19:33:38 CEST 2008


Dmitry Dulepov [typo3] wrote:
> Hi!
> 
> Ingo Renner wrote:
>> For the file_exists case: Change it to throw exceptions...
> 
> How do I change PHP function to throw exceptions? 8-0 file_exists() 
> produces a PHP warning if the file does not exist. Using @ prevents this 
> warning and lets the function work as expected.

if(!file_exists($file)) {
	throw new FileNotFoundException();
}

No need for an @

Ingo

-- 
Ingo Renner
TYPO3 Core Developer, Release Manager TYPO3 4.2


More information about the TYPO3-team-core mailing list