summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2003-06-27 10:46:54 +0000
committerPierre Joye <pajoye@php.net>2003-06-27 10:46:54 +0000
commitdd2d9c331548ad6bccb36e15006c73789e7fdb1d (patch)
tree4ad7f25ad66ba584f1501a5aaf8486002031d665
parentc6a1a9edadf395a03ce113d02bc0dfa625ea79c9 (diff)
downloadphp-git-dd2d9c331548ad6bccb36e15006c73789e7fdb1d.tar.gz
- Sync
-rw-r--r--pear/PEAR/Command/Package.php2
-rw-r--r--pear/PEAR/Installer.php2
-rw-r--r--pear/PEAR/Packager.php4
-rw-r--r--pear/PEAR/Registry.php4
4 files changed, 6 insertions, 6 deletions
diff --git a/pear/PEAR/Command/Package.php b/pear/PEAR/Command/Package.php
index 986c6c7dab..54a44d6fc0 100644
--- a/pear/PEAR/Command/Package.php
+++ b/pear/PEAR/Command/Package.php
@@ -662,7 +662,7 @@ Wrote: /usr/src/redhat/RPMS/i386/PEAR::Net_Socket-1.0-1.i386.rpm
$spec_contents = preg_replace('/@([a-z0-9_-]+)@/e', '$info["\1"]', fread($fp, filesize($spec_template)));
fclose($fp);
$spec_file = "$info[rpm_package]-$info[version].spec";
- $wp = fopen($spec_file, "w");
+ $wp = fopen($spec_file, "wb");
if (!$wp) {
return $this->raiseError("could not write RPM spec file $spec_file: $php_errormsg");
}
diff --git a/pear/PEAR/Installer.php b/pear/PEAR/Installer.php
index 615a9c98a3..58541c5a67 100644
--- a/pear/PEAR/Installer.php
+++ b/pear/PEAR/Installer.php
@@ -261,7 +261,7 @@ class PEAR_Installer extends PEAR_Common
if (sizeof($subst_from)) {
$contents = str_replace($subst_from, $subst_to, $contents);
}
- $wp = @fopen($dest_file, "w");
+ $wp = @fopen($dest_file, "wb");
if (!is_resource($wp)) {
return $this->raiseError("failed to create $dest_file: $php_errormsg",
PEAR_INSTALLER_FAILED);
diff --git a/pear/PEAR/Packager.php b/pear/PEAR/Packager.php
index 507b9f6041..58e550992c 100644
--- a/pear/PEAR/Packager.php
+++ b/pear/PEAR/Packager.php
@@ -121,7 +121,7 @@ class PEAR_Packager extends PEAR_Common
return $this->raiseError("PEAR_Packager: mktemp failed");
}
$newpkgfile = $tmpdir . DIRECTORY_SEPARATOR . 'package.xml';
- $np = @fopen($newpkgfile, "w");
+ $np = @fopen($newpkgfile, "wb");
if (!$np) {
chdir($oldcwd);
return $this->raiseError("PEAR_Packager: unable to rewrite $pkgfile as $newpkgfile");
@@ -173,4 +173,4 @@ if (!function_exists('md5_file')) {
}
}
-?> \ No newline at end of file
+?>
diff --git a/pear/PEAR/Registry.php b/pear/PEAR/Registry.php
index 482e0f369e..6450d20202 100644
--- a/pear/PEAR/Registry.php
+++ b/pear/PEAR/Registry.php
@@ -223,7 +223,7 @@ class PEAR_Registry extends PEAR
}
}
$this->_assertStateDir();
- $fp = @fopen($this->filemap, 'w');
+ $fp = @fopen($this->filemap, 'wb');
if (!$fp) {
return false;
}
@@ -572,7 +572,7 @@ class PEAR_Registry extends PEAR
if (PEAR::isError($e = $this->_lock(LOCK_EX))) {
return $e;
}
- if (!$fp = fopen($this->depfile, 'w')) {
+ if (!$fp = fopen($this->depfile, 'wb')) {
$this->_unlock();
return $this->raiseError("Could not open dependencies file `".$this->depfile."' for writting");
}