cvs: pear /Image_Transform Transform.php

From: Date: Tue, 11 Dec 2007 20:53:21 +0000
Subject: cvs: pear /Image_Transform Transform.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-49725@lists.php.net to get a copy of this message
dufuz Tue Dec 11 20:53:21 2007 UTC Modified files: /pear/Image_Transform Transform.php Log: Move the filepath into a single var so that the is_readable check, the error msg and the include all use the exact same path (they did before but this will make 100% sure) http://cvs.php.net/viewvc.cgi/pear/Image_Transform/Transform.php?r1=1.48&r2=1.49&diff_format=u Index: pear/Image_Transform/Transform.php diff -u pear/Image_Transform/Transform.php:1.48 pear/Image_Transform/Transform.php:1.49 --- pear/Image_Transform/Transform.php:1.48 Tue Dec 11 20:50:54 2007 +++ pear/Image_Transform/Transform.php Tue Dec 11 20:53:21 2007 @@ -22,7 +22,7 @@ * @author Philippe Jausions <Philippe.Jausions@11abacus.com> * @copyright 2002-2007 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: Transform.php,v 1.48 2007/12/11 20:50:54 dufuz Exp $ + * @version CVS: $Id: Transform.php,v 1.49 2007/12/11 20:53:21 dufuz Exp $ * @link http://pear.php.net/package/Image_Transform */ @@ -229,12 +229,13 @@ } } - if (!is_readable('Image/Transform/Driver' . $driver . '.php')) { - return PEAR::raiseError('Driver failed to load file Image/Transform/Driver/' . $driver . '.php', + $file = 'Image/Transform/Driver' . $driver . '.php'; + if (!is_readable($file)) { + return PEAR::raiseError('Driver failed to load file ' . $fil , IMAGE_TRANSFORM_DRIVER_FILE_MISSING); } - include_once 'Image/Transform/Driver/' . $driver . '.php'; + include_once $file; $classname = 'Image_Transform_Driver_' . $driver; if (!class_exists($classname)) {

« previous php.pear.cvs (#49725) next »