summaryrefslogtreecommitdiff
path: root/pear
diff options
context:
space:
mode:
authorGreg Beaver <cellog@php.net>2003-12-07 00:29:46 +0000
committerGreg Beaver <cellog@php.net>2003-12-07 00:29:46 +0000
commit06ef18bed92da46e829885bc657bb93f39de7735 (patch)
treeba32b4f88f63ffae3bb6fb9654f2a2200ee04b5b /pear
parent6a847a797e0fcd5e184c27a262b68bb9cff00aa6 (diff)
downloadphp-git-06ef18bed92da46e829885bc657bb93f39de7735.tar.gz
fix #279
Diffstat (limited to 'pear')
-rw-r--r--pear/PEAR/Config.php3
-rw-r--r--pear/PEAR/Registry.php6
2 files changed, 9 insertions, 0 deletions
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) {