]> granicus.if.org Git - php/commitdiff
* disable magic_quotes_runtime (what a broken concept!!) while
authorStig Bakken <ssb@php.net>
Tue, 28 May 2002 00:31:04 +0000 (00:31 +0000)
committerStig Bakken <ssb@php.net>
Tue, 28 May 2002 00:31:04 +0000 (00:31 +0000)
  reading config files

pear/PEAR/Config.php

index 146ceca3e9ef0d4e23a6235638a006b345c8efa9..26917fa79a564361a0568d13016d7150fab7644c 100644 (file)
@@ -399,8 +399,12 @@ class PEAR_Config extends PEAR
         if (!$fp) {
             return $this->raiseError("PEAR_Config::readConfigFile fopen('$file','r') failed");
         }
+        $old_ini = ini_get("magic_quotes_runtime");
+        ini_set("magic_quotes_runtime", false);
         $size = filesize($file);
         $contents = fread($fp, $size);
+        fclose($fp);
+        ini_set("magic_quotes_runtime", $old_ini);
         $version = '0.1';
         if (preg_match('/^#PEAR_Config\s+(\S+)\s+/si', $contents, $matches)) {
             $version = $matches[1];