summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPierre Joye <pajoye@php.net>2003-06-26 14:47:11 +0000
committerPierre Joye <pajoye@php.net>2003-06-26 14:47:11 +0000
commit4259d77a97fb728ca6046c610232c5e63c0e322d (patch)
treeab6e77b1525a312e42f6393fce0a9b40829b7069
parentca4c9c37a4df7e21adfef252082513bf0c4c0b78 (diff)
downloadphp-git-4259d77a97fb728ca6046c610232c5e63c0e322d.tar.gz
- Sync fix binary safe
-rw-r--r--pear/PEAR/Installer.php2
-rw-r--r--pear/PEAR/Packager.php4
-rw-r--r--pear/PEAR/Registry.php4
3 files changed, 5 insertions, 5 deletions
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 4716003a42..22158d96d9 100644
--- a/pear/PEAR/Registry.php
+++ b/pear/PEAR/Registry.php
@@ -219,7 +219,7 @@ class PEAR_Registry extends PEAR
}
}
$this->_assertStateDir();
- $fp = @fopen($this->filemap, 'w');
+ $fp = @fopen($this->filemap, 'wb');
if (!$fp) {
return false;
}
@@ -568,7 +568,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");
}