Re: PEAR Coding Standards

From: Date: Thu, 06 May 2004 15:27:00 +0000
Subject: Re: PEAR Coding Standards
References: 1 2 3 4  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-28890@lists.php.net to get a copy of this message
Florent Monnier wrote:
In the function addUserFilter(), your include won't work in case that somefile.php does not exists if you strip the '@': I think you should put it back this way, for this code to work as you expect: $bCheckReq = @include_once 'somefile.php'; if (!$bCheckReq) {
    //error handling
} If you really want to remove all '@' from your code, perhaps another solution would be to use if(file_exists() && is_readable()) {/*safe include*/}
this doesnt work as the above check does not check your include path -- Lukas Smith smith@backendmedia.com _______________________________ BackendMedia www.backendmedia.com berlin@backendmedia.com Linn Zwoch Smith GbR Pariser Str. 44 D-10707 Berlin Tel +49 30 83 22 50 00 Fax +49 30 83 22 50 07

« previous php.pear.dev (#28890) next »