From 06ef18bed92da46e829885bc657bb93f39de7735 Mon Sep 17 00:00:00 2001 From: Greg Beaver Date: Sun, 7 Dec 2003 00:29:46 +0000 Subject: [PATCH] fix #279 --- pear/PEAR/Config.php | 3 +++ pear/PEAR/Registry.php | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/pear/PEAR/Config.php b/pear/PEAR/Config.php index 36253c3cd0..f3179750e6 100644 --- a/pear/PEAR/Config.php +++ b/pear/PEAR/Config.php @@ -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)) { diff --git a/pear/PEAR/Registry.php b/pear/PEAR/Registry.php index c28d2039ae..d6b531b2b7 100644 --- a/pear/PEAR/Registry.php +++ b/pear/PEAR/Registry.php @@ -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) { -- 2.40.0