cvs: php4 /pear System.php /pear/PEAR Registry.php
| From: | Christian Dickmann | Date: | Sun, 02 Jun 2002 14:27:15 +0000 |
| Subject: | cvs: php4 /pear System.php /pear/PEAR Registry.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-4371@lists.php.net to get a copy of this message | ||
dickmann Sun Jun 2 10:27:15 2002 EDT
Modified files:
/php4/pear System.php
/php4/pear/PEAR Registry.php
Log:
silence unlink() and rmdir(). fix a bug where wasn't set due to wrong ini setting
Index: php4/pear/System.php
diff -u php4/pear/System.php:1.14 php4/pear/System.php:1.15
--- php4/pear/System.php:1.14 Fri May 31 14:49:47 2002
+++ php4/pear/System.php Sun Jun 2 10:27:15 2002
@@ -16,7 +16,7 @@
// | Authors: Tomas V.V.Cox <cox@idecnet.com> |
// +----------------------------------------------------------------------+
//
-// $Id: System.php,v 1.14 2002/05/31 18:49:47 cox Exp $
+// $Id: System.php,v 1.15 2002/06/02 14:27:15 dickmann Exp $
//
require_once 'PEAR.php';
@@ -43,7 +43,7 @@
*
* @package System
* @author Tomas V.V.Cox <cox@idecnet.com>
-* @version $Revision: 1.14 $
+* @version $Revision: 1.15 $
* @access public
* @see http://pear.php.net/manual/
*/
@@ -182,19 +182,19 @@
if (isset($do_recursive)) {
$struct = System::_multipleToStruct($opts[1]);
foreach($struct['files'] as $file) {
- if (!unlink($file)) {
+ if (!@unlink($file)) {
$ret = false;
}
}
foreach($struct['dirs'] as $dir) {
- if (!rmdir($dir)) {
+ if (!@rmdir($dir)) {
$ret = false;
}
}
} else {
foreach ($opts[1] as $file) {
$delete = (is_dir($file)) ? 'rmdir' : 'unlink';
- if (!$delete($file)) {
+ if (!@$delete($file)) {
$ret = false;
}
}
Index: php4/pear/PEAR/Registry.php
diff -u php4/pear/PEAR/Registry.php:1.26 php4/pear/PEAR/Registry.php:1.27
--- php4/pear/PEAR/Registry.php:1.26 Tue Apr 23 20:48:06 2002
+++ php4/pear/PEAR/Registry.php Sun Jun 2 10:27:15 2002
@@ -16,7 +16,7 @@
// | Author: Stig Bakken <ssb@fast.no> |
// +----------------------------------------------------------------------+
//
-// $Id: Registry.php,v 1.26 2002/04/24 00:48:06 ssb Exp $
+// $Id: Registry.php,v 1.27 2002/06/02 14:27:15 dickmann Exp $
require_once "System.php";
require_once "PEAR.php";
@@ -224,7 +224,11 @@
}
$open_mode = 'r';
}
+
+ @ini_set('track_errors', true);
$this->lock_fp = @fopen($this->lockfile, $open_mode);
+ @ini_restore('track_errors');
+
if (!is_resource($this->lock_fp)) {
return $this->raiseError("could not create lock file: $php_errormsg");
}