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);
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");
}
}
-?>
\ No newline at end of file
+?>
}
}
$this->_assertStateDir();
- $fp = @fopen($this->filemap, 'w');
+ $fp = @fopen($this->filemap, 'wb');
if (!$fp) {
return false;
}
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");
}