Re: cvs: php-src /ext/xmlreader php_xmlreader.c
| From: | Andrei Zmievski | Date: | Fri, 21 Jul 2006 01:05:04 +0000 |
| Subject: | Re: cvs: php-src /ext/xmlreader php_xmlreader.c | ||
| References: | 1 | Groups: | php.cvs |
| Request: | Send a blank email to php-cvs+get-39420@lists.php.net to get a copy of this message | ||
So you're encoding the source even when type is XMLREADER_LOAD_STRING?
-Andrei
On Jul 20, 2006, at 5:57 PM, Rob Richards wrote:
+ if (type == XMLREADER_LOAD_FILE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "t!", &source, &source_len, &source_type) == FAILURE) { + return; + } + } else { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s!", &source, &source_len) == FAILURE) { + return; + } } if (source != NULL && !source_len) { @@ -520,10 +527,18 @@ intern = (xmlreader_object *)zend_object_store_get_object(id TSRMLS_CC); if (intern && intern->ptr) { if (source) { + if (source_type == IS_UNICODE) { + if (php_stream_path_encode(NULL, &source, &source_len, (UChar*)source, source_len, REPORT_ERRORS, NULL) == FAILURE) { + RETURN_FALSE; + } + }