Skip to content

Commit 4259d77

Browse files
committed
- Sync fix binary safe
1 parent ca4c9c3 commit 4259d77

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

pear/PEAR/Installer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,7 @@ function _installFile($file, $atts, $tmp_path)
261261
if (sizeof($subst_from)) {
262262
$contents = str_replace($subst_from, $subst_to, $contents);
263263
}
264-
$wp = @fopen($dest_file, "w");
264+
$wp = @fopen($dest_file, "wb");
265265
if (!is_resource($wp)) {
266266
return $this->raiseError("failed to create $dest_file: $php_errormsg",
267267
PEAR_INSTALLER_FAILED);

pear/PEAR/Packager.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ function package($pkgfile = null, $compress = true)
121121
return $this->raiseError("PEAR_Packager: mktemp failed");
122122
}
123123
$newpkgfile = $tmpdir . DIRECTORY_SEPARATOR . 'package.xml';
124-
$np = @fopen($newpkgfile, "w");
124+
$np = @fopen($newpkgfile, "wb");
125125
if (!$np) {
126126
chdir($oldcwd);
127127
return $this->raiseError("PEAR_Packager: unable to rewrite $pkgfile as $newpkgfile");
@@ -173,4 +173,4 @@ function md5_file($file) {
173173
}
174174
}
175175

176-
?>
176+
?>

pear/PEAR/Registry.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ function rebuildFileMap()
219219
}
220220
}
221221
$this->_assertStateDir();
222-
$fp = @fopen($this->filemap, 'w');
222+
$fp = @fopen($this->filemap, 'wb');
223223
if (!$fp) {
224224
return false;
225225
}
@@ -568,7 +568,7 @@ function _depWriteDepDB(&$deps)
568568
if (PEAR::isError($e = $this->_lock(LOCK_EX))) {
569569
return $e;
570570
}
571-
if (!$fp = fopen($this->depfile, 'w')) {
571+
if (!$fp = fopen($this->depfile, 'wb')) {
572572
$this->_unlock();
573573
return $this->raiseError("Could not open dependencies file `".$this->depfile."' for writting");
574574
}

0 commit comments

Comments
 (0)