cvs: pear /XML_Parser Parser.php
| From: | Stephan Schmidt | Date: | Tue, 05 Oct 2004 19:23:34 +0000 |
| Subject: | cvs: pear /XML_Parser Parser.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-24626@lists.php.net to get a copy of this message | ||
schst Tue Oct 5 15:23:34 2004 EDT
Modified files:
/pear/XML_Parser Parser.php
Log:
fixed bug #2458 Put allow_url_fopen back in original state when opening from URL
http://cvs.php.net/diff.php/pear/XML_Parser/Parser.php?r1=1.15&r2=1.16&ty=u
Index: pear/XML_Parser/Parser.php
diff -u pear/XML_Parser/Parser.php:1.15 pear/XML_Parser/Parser.php:1.16
--- pear/XML_Parser/Parser.php:1.15 Mon Oct 4 12:56:49 2004
+++ pear/XML_Parser/Parser.php Tue Oct 5 15:23:34 2004
@@ -18,7 +18,7 @@
// | Stephan Schmidt <schst@php-tools.net> |
// +----------------------------------------------------------------------+
//
-// $Id: Parser.php,v 1.15 2004/10/04 16:56:49 schst Exp $
+// $Id: Parser.php,v 1.16 2004/10/05 19:23:34 schst Exp $
/**
* XML Parser class.
@@ -377,13 +377,14 @@
*/
if (eregi('^(http|ftp)://', substr($file, 0, 10))) {
if (!ini_get('safe_mode')) {
- ini_set('allow_url_fopen', 1);
+ $oldVal = ini_set('allow_url_fopen', 1);
} else {
return $this->raiseError('Remote files cannot be parsed, as safe mode is
enabled.', XML_PARSER_ERROR_REMOTE);
}
}
$fp = @fopen($file, 'rb');
+ ini_set('allow_url_fopen', $oldVal);
if (is_resource($fp)) {
$this->fp = $fp;
return $fp;