Re: Image_Transform driver check

From: Date: Mon, 28 Apr 2008 07:43:22 +0000
Subject: Re: Image_Transform driver check
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-49919@lists.php.net to get a copy of this message
Hi, That's why we have a bug system; Please report. - Helgi On Sun, Apr 27, 2008 at 6:53 PM, Christian Weiske <cweiske@cweiske.de> wrote: > Hello all, > > > Image_Transform tries to check if a driver exists by doing > > $file = 'Image/Transform/Driver/' . $driver . '.php'; > > if (!is_readable($file)) { > > //throw error > > } > > This is totally incorrect! is_readable does not check in the include > path, only locally. The right way - in my opinion - is to use fopen > with the use_include_path option set to true: > > > if (!@fclose(@fopen($file, 'r', true))) { > > //throw error > > } > > Could that be changed? > > -- > Regards/Mit freundlichen Grüßen > Christian Weiske >

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