]> granicus.if.org Git - php/commitdiff
- Fix the "weird bug" with different serialized file under cli/cgi or apache sapi
authorPierre Joye <pajoye@php.net>
Tue, 27 May 2003 23:31:56 +0000 (23:31 +0000)
committerPierre Joye <pajoye@php.net>
Tue, 27 May 2003 23:31:56 +0000 (23:31 +0000)
Important Notice:
*always* use 'wb' to write file, sapi cli and cgi force the default to be binary, apache does not.

pear/PEAR/Registry.php

index 68a33b36e78c4261b78daa9ccbdd0a580e6af038..97102eb636f1ecca3d37ee41c677089679011798 100644 (file)
@@ -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;