]> granicus.if.org Git - php/commitdiff
fix #279
authorGreg Beaver <cellog@php.net>
Sun, 7 Dec 2003 00:29:46 +0000 (00:29 +0000)
committerGreg Beaver <cellog@php.net>
Sun, 7 Dec 2003 00:29:46 +0000 (00:29 +0000)
pear/PEAR/Config.php
pear/PEAR/Registry.php

index 36253c3cd00042377be1da8b963d49933492cde9..f3179750e6fb13268f7ecdf8fbfe985c5d431eed 100644 (file)
@@ -615,7 +615,10 @@ class PEAR_Config extends PEAR
             return $this->raiseError("PEAR_Config::readConfigFile fopen('$file','r') failed");
         }
         $size = filesize($file);
+        $rt = get_magic_quotes_runtime();
+        set_magic_quotes_runtime(0);
         $contents = fread($fp, $size);
+        set_magic_quotes_runtime($rt);
         fclose($fp);
         $version = '0.1';
         if (preg_match('/^#PEAR_Config\s+(\S+)\s+/si', $contents, $matches)) {
index c28d2039aea58320d8cfe4e972d5f6784562141a..d6b531b2b78ae1e3d48ee1ec17c003735c91cab4 100644 (file)
@@ -239,7 +239,10 @@ class PEAR_Registry extends PEAR
             return $this->raiseError('PEAR_Registry: could not open filemap', PEAR_REGISTRY_ERROR_FILE, null, null, $php_errormsg);
         }
         $fsize = filesize($this->filemap);
+        $rt = get_magic_quotes_runtime();
+        set_magic_quotes_runtime(0);
         $data = fread($fp, $fsize);
+        set_magic_quotes_runtime($rt);
         fclose($fp);
         $tmp = unserialize($data);
         if (!$tmp && $fsize > 7) {
@@ -334,7 +337,10 @@ class PEAR_Registry extends PEAR
         if ($fp === null) {
             return null;
         }
+        $rt = get_magic_quotes_runtime();
+        set_magic_quotes_runtime(0);
         $data = fread($fp, filesize($this->_packageFileName($package)));
+        set_magic_quotes_runtime($rt);
         $this->_closePackageFile($fp);
         $data = unserialize($data);
         if ($key === null) {