version 1.1.1.2, 2012/05/29 12:34:42
|
version 1.1.1.3, 2013/07/22 01:32:01
|
Line 2
|
Line 2
|
+----------------------------------------------------------------------+ |
+----------------------------------------------------------------------+ |
| PHP Version 5 | |
| PHP Version 5 | |
+----------------------------------------------------------------------+ |
+----------------------------------------------------------------------+ |
| Copyright (c) 1997-2012 The PHP Group | | | Copyright (c) 1997-2013 The PHP Group | |
+----------------------------------------------------------------------+ |
+----------------------------------------------------------------------+ |
| This source file is subject to version 3.01 of the PHP license, | |
| This source file is subject to version 3.01 of the PHP license, | |
| that is bundled with this package in the file LICENSE, and is | |
| that is bundled with this package in the file LICENSE, and is | |
Line 20
|
Line 20
|
/* $Id$ */ |
/* $Id$ */ |
|
|
#include "php_soap.h" |
#include "php_soap.h" |
|
#include "ext/libxml/php_libxml.h" |
#include "libxml/parser.h" |
#include "libxml/parser.h" |
#include "libxml/parserInternals.h" |
#include "libxml/parserInternals.h" |
|
|
Line 91 xmlDocPtr soap_xmlParseFile(const char *filename TSRML
|
Line 92 xmlDocPtr soap_xmlParseFile(const char *filename TSRML
|
ctxt = xmlCreateFileParserCtxt(filename); |
ctxt = xmlCreateFileParserCtxt(filename); |
PG(allow_url_fopen) = old_allow_url_fopen; |
PG(allow_url_fopen) = old_allow_url_fopen; |
if (ctxt) { |
if (ctxt) { |
|
zend_bool old; |
|
|
ctxt->keepBlanks = 0; |
ctxt->keepBlanks = 0; |
ctxt->sax->ignorableWhitespace = soap_ignorableWhitespace; |
ctxt->sax->ignorableWhitespace = soap_ignorableWhitespace; |
ctxt->sax->comment = soap_Comment; |
ctxt->sax->comment = soap_Comment; |
ctxt->sax->warning = NULL; |
ctxt->sax->warning = NULL; |
ctxt->sax->error = NULL; |
ctxt->sax->error = NULL; |
/*ctxt->sax->fatalError = NULL;*/ |
/*ctxt->sax->fatalError = NULL;*/ |
|
old = php_libxml_disable_entity_loader(1 TSRMLS_CC); |
xmlParseDocument(ctxt); |
xmlParseDocument(ctxt); |
|
php_libxml_disable_entity_loader(old TSRMLS_CC); |
if (ctxt->wellFormed) { |
if (ctxt->wellFormed) { |
ret = ctxt->myDoc; |
ret = ctxt->myDoc; |
if (ret->URL == NULL && ctxt->directory != NULL) { |
if (ret->URL == NULL && ctxt->directory != NULL) { |
Line 128 xmlDocPtr soap_xmlParseMemory(const void *buf, size_t
|
Line 133 xmlDocPtr soap_xmlParseMemory(const void *buf, size_t
|
xmlParserCtxtPtr ctxt = NULL; |
xmlParserCtxtPtr ctxt = NULL; |
xmlDocPtr ret; |
xmlDocPtr ret; |
|
|
|
TSRMLS_FETCH(); |
|
|
/* |
/* |
xmlInitParser(); |
xmlInitParser(); |
*/ |
*/ |
ctxt = xmlCreateMemoryParserCtxt(buf, buf_size); |
ctxt = xmlCreateMemoryParserCtxt(buf, buf_size); |
if (ctxt) { |
if (ctxt) { |
|
zend_bool old; |
|
|
ctxt->sax->ignorableWhitespace = soap_ignorableWhitespace; |
ctxt->sax->ignorableWhitespace = soap_ignorableWhitespace; |
ctxt->sax->comment = soap_Comment; |
ctxt->sax->comment = soap_Comment; |
ctxt->sax->warning = NULL; |
ctxt->sax->warning = NULL; |
Line 141 xmlDocPtr soap_xmlParseMemory(const void *buf, size_t
|
Line 150 xmlDocPtr soap_xmlParseMemory(const void *buf, size_t
|
#if LIBXML_VERSION >= 20703 |
#if LIBXML_VERSION >= 20703 |
ctxt->options |= XML_PARSE_HUGE; |
ctxt->options |= XML_PARSE_HUGE; |
#endif |
#endif |
|
old = php_libxml_disable_entity_loader(1 TSRMLS_CC); |
xmlParseDocument(ctxt); |
xmlParseDocument(ctxt); |
|
php_libxml_disable_entity_loader(old TSRMLS_CC); |
if (ctxt->wellFormed) { |
if (ctxt->wellFormed) { |
ret = ctxt->myDoc; |
ret = ctxt->myDoc; |
if (ret->URL == NULL && ctxt->directory != NULL) { |
if (ret->URL == NULL && ctxt->directory != NULL) { |