cvs: pear-core /PEAR PackageFile.php

From: Date: Mon, 27 Mar 2006 04:23:47 +0000
Subject: cvs: pear-core /PEAR PackageFile.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-4669@lists.php.net to get a copy of this message
cellog Mon Mar 27 04:23:47 2006 UTC Modified files: /pear-core/PEAR PackageFile.php Log: reduce frequency that we will reach a @ function http://cvs.php.net/viewcvs.cgi/pear-core/PEAR/PackageFile.php?r1=1.34&r2=1.35&diff_format=u Index: pear-core/PEAR/PackageFile.php diff -u pear-core/PEAR/PackageFile.php:1.34 pear-core/PEAR/PackageFile.php:1.35 --- pear-core/PEAR/PackageFile.php:1.34 Sat Mar 25 21:09:08 2006 +++ pear-core/PEAR/PackageFile.php Mon Mar 27 04:23:47 2006 @@ -15,7 +15,7 @@ * @author Greg Beaver <cellog@php.net> * @copyright 1997-2006 The PHP Group * @license http://www.php.net/license/3_0.txt PHP License 3.0 - * @version CVS: $Id: PackageFile.php,v 1.34 2006/03/25 21:09:08 cellog Exp $ + * @version CVS: $Id: PackageFile.php,v 1.35 2006/03/27 04:23:47 cellog Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -306,7 +306,8 @@ $tar->popErrorHandling(); } if (!is_array($content)) { - if (is_string($file) && strlen($file < 255) && !@is_file($file)) { + if (is_string($file) && strlen($file < 255) && + (!file_exists($file) || !@is_file($file))) { $ret = PEAR::raiseError("could not open file \"$file\""); return $ret; } @@ -366,8 +367,8 @@ function &fromPackageFile($descfile, $state, $archive = false) { if (is_string($descfile) && strlen($descfile) < 255 && - !@is_file($descfile) || !is_readable($descfile) || - (!$fp = @fopen($descfile, 'r'))) { + (!file_exists($descfile) || !is_file($descfile) || !is_readable($descfile) || + (!$fp = @fopen($descfile, 'r')))) { $a = PEAR::raiseError("Unable to open $descfile"); return $a; }

« previous php.pear.core (#4669) next »