You're right. I guess it was just a bit too subtle for me after the
day of staring at the code. :)
-Andrei
On Jul 20, 2006, at 6:20 PM, Rob Richards wrote:
When type is XMLREADER_LOAD_STRING, it uses the "s" parameter, so
wouldn't the source_type be IS_STRING (from the initial variable
declaration) causing it to never be encoded?
Rob
Andrei Zmievski wrote:
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;
+ }
+ }
--PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php