From: Pierre Joye Date: Tue, 27 May 2003 23:31:56 +0000 (+0000) Subject: - Fix the "weird bug" with different serialized file under cli/cgi or apache sapi X-Git-Tag: RELEASE_1_0_2~563 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=400e5c0b66317217cf1615d315549e96ff76f301;p=php - Fix the "weird bug" with different serialized file under cli/cgi or apache sapi Important Notice: *always* use 'wb' to write file, sapi cli and cgi force the default to be binary, apache does not. --- diff --git a/pear/PEAR/Registry.php b/pear/PEAR/Registry.php index 68a33b36e7..97102eb636 100644 --- a/pear/PEAR/Registry.php +++ b/pear/PEAR/Registry.php @@ -404,7 +404,7 @@ class PEAR_Registry extends PEAR if (PEAR::isError($e = $this->_lock(LOCK_EX))) { return $e; } - $fp = $this->_openPackageFile($package, 'w'); + $fp = $this->_openPackageFile($package, 'wb'); if ($fp === null) { $this->_unlock(); return false;