[PHP-CVS] com php-src: Merge branch 'PHP-5.3' into PHP-5.4: ext/xml/xml.c

2013-07-06 Thread Rob Richards
Commit:e4a28b7b7b972fecd01458364c0663195352891e
Author:Rob Richards rricha...@php.net Sat, 6 Jul 2013 07:59:20 
-0400
Parents:   c652cc93ec5ce8f1833d023159804ebd56e1a94e 
7d163e8a0880ae8af2dd869071393e5dc07ef271
Branches:  PHP-5.4 PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=e4a28b7b7b972fecd01458364c0663195352891e

Log:
Merge branch 'PHP-5.3' into PHP-5.4

# By Rob Richards (1)
* PHP-5.3:
  truncate results at depth of 255 to prevent corruption

Changed paths:
  MM  ext/xml/xml.c


Diff:



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: truncate results at depth of 255 to prevent corruption: ext/xml/xml.c

2013-07-06 Thread Rob Richards
Commit:7d163e8a0880ae8af2dd869071393e5dc07ef271
Author:Rob Richards rricha...@php.net Sat, 6 Jul 2013 07:53:07 
-0400
Parents:   e964817b244d091dc38f59f5d7f1735110b698af
Branches:  PHP-5.3 PHP-5.4 PHP-5.5 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=7d163e8a0880ae8af2dd869071393e5dc07ef271

Log:
truncate results at depth of 255 to prevent corruption

Changed paths:
  M  ext/xml/xml.c


Diff:
diff --git a/ext/xml/xml.c b/ext/xml/xml.c
index 1f0480b..9f0bc30 100644
--- a/ext/xml/xml.c
+++ b/ext/xml/xml.c
@@ -427,7 +427,7 @@ static void xml_parser_dtor(zend_rsrc_list_entry *rsrc 
TSRMLS_DC)
}
if (parser-ltags) {
int inx;
-   for (inx = 0; inx  parser-level; inx++)
+   for (inx = 0; ((inx  parser-level)  (inx  XML_MAXLEVEL)); 
inx++)
efree(parser-ltags[ inx ]);
efree(parser-ltags);
}
@@ -905,45 +905,50 @@ void _xml_startElementHandler(void *userData, const 
XML_Char *name, const XML_Ch
} 
 
if (parser-data) {
-   zval *tag, *atr;
-   int atcnt = 0;
+   if (parser-level = XML_MAXLEVEL)  {
+   zval *tag, *atr;
+   int atcnt = 0;
 
-   MAKE_STD_ZVAL(tag);
-   MAKE_STD_ZVAL(atr);
+   MAKE_STD_ZVAL(tag);
+   MAKE_STD_ZVAL(atr);
 
-   array_init(tag);
-   array_init(atr);
+   array_init(tag);
+   array_init(atr);
 
-   _xml_add_to_info(parser,((char *) tag_name) + 
parser-toffset);
+   _xml_add_to_info(parser,((char *) tag_name) + 
parser-toffset);
 
-   add_assoc_string(tag,tag,((char *) tag_name) + 
parser-toffset,1); /* cast to avoid gcc-warning */
-   add_assoc_string(tag,type,open,1);
-   add_assoc_long(tag,level,parser-level);
+   add_assoc_string(tag,tag,((char *) tag_name) 
+ parser-toffset,1); /* cast to avoid gcc-warning */
+   add_assoc_string(tag,type,open,1);
+   add_assoc_long(tag,level,parser-level);
 
-   parser-ltags[parser-level-1] = estrdup(tag_name);
-   parser-lastwasopen = 1;
+   parser-ltags[parser-level-1] = 
estrdup(tag_name);
+   parser-lastwasopen = 1;
 
-   attributes = (const XML_Char **) attrs;
+   attributes = (const XML_Char **) attrs;
 
-   while (attributes  *attributes) {
-   att = _xml_decode_tag(parser, attributes[0]);
-   val = xml_utf8_decode(attributes[1], 
strlen(attributes[1]), val_len, parser-target_encoding);
-   
-   add_assoc_stringl(atr,att,val,val_len,0);
+   while (attributes  *attributes) {
+   att = _xml_decode_tag(parser, 
attributes[0]);
+   val = xml_utf8_decode(attributes[1], 
strlen(attributes[1]), val_len, parser-target_encoding);
 
-   atcnt++;
-   attributes += 2;
+   
add_assoc_stringl(atr,att,val,val_len,0);
 
-   efree(att);
-   }
+   atcnt++;
+   attributes += 2;
 
-   if (atcnt) {
-   
zend_hash_add(Z_ARRVAL_P(tag),attributes,sizeof(attributes),atr,sizeof(zval*),NULL);
-   } else {
-   zval_ptr_dtor(atr);
-   }
+   efree(att);
+   }
+
+   if (atcnt) {
+   
zend_hash_add(Z_ARRVAL_P(tag),attributes,sizeof(attributes),atr,sizeof(zval*),NULL);
+   } else {
+   zval_ptr_dtor(atr);
+   }
 
-   
zend_hash_next_index_insert(Z_ARRVAL_P(parser-data),tag,sizeof(zval*),(void 
*) parser-ctag);
+   
zend_hash_next_index_insert(Z_ARRVAL_P(parser-data),tag,sizeof(zval*),(void 
*) parser-ctag);
+   } else if (parser-level == (XML_MAXLEVEL + 1)) {
+   TSRMLS_FETCH();
+   php_error_docref(NULL TSRMLS_CC, E_WARNING, 
Maximum depth exceeded - Results truncated

[PHP-CVS] com php-src: fix bug #63015 (Incorrect arginfo for DOMErrorHandler): NEWS ext/dom/domerrorhandler.c

2012-09-20 Thread Rob Richards
Commit:ffa72707c86750816f665656c02a0a0451300296
Author:Rob Richards rricha...@php.net Thu, 20 Sep 2012 02:34:07 
-0400
Parents:   dd6b7ea7bd31ec3253004901285ae0d191974c6e
Branches:  PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=ffa72707c86750816f665656c02a0a0451300296

Log:
fix bug #63015 (Incorrect arginfo for DOMErrorHandler)

Bugs:
https://bugs.php.net/63015

Changed paths:
  M  NEWS
  M  ext/dom/domerrorhandler.c


Diff:
diff --git a/NEWS b/NEWS
index 8fb3810..0c57e0c 100644
--- a/NEWS
+++ b/NEWS
@@ -24,6 +24,9 @@ PHP   
 NEWS
   . Fixed bug #60909 (custom error handler throwing Exception + fatal error
 = no shutdown function). (Dmitry)
 
+- DOM:
+  . Fixed bug #63015 (Incorrect arginfo for DOMErrorHandler). (Rob)
+
 - OpenSSL:
   . Implemented FR #61421 (OpenSSL signature verification missing RMD160, 
 SHA224, SHA256, SHA384, SHA512). (Mark Jones)
diff --git a/ext/dom/domerrorhandler.c b/ext/dom/domerrorhandler.c
index f1ab287..e282f30 100644
--- a/ext/dom/domerrorhandler.c
+++ b/ext/dom/domerrorhandler.c
@@ -29,7 +29,7 @@
 
 /* {{{ arginfo */
 ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_domerrorhandler_handle_error, 0, 0, 1)
-   ZEND_ARG_OBJ_INFO(0, error, DOMError, 0)
+   ZEND_ARG_OBJ_INFO(0, error, DOMDomError, 0)
 ZEND_END_ARG_INFO();
 /* }}} */


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: Update to work with libxml 2.9.0: ext/dom/documenttype.c ext/dom/node.c ext/simplexml/simplexml.c

2012-08-09 Thread Rob Richards
Commit:c4b26cc1b0b0521c75e653fffec2a9e3b4bf8cbb
Author:Daniel Veillard veill...@redhat.com Thu, 9 Aug 2012 
14:02:33 -0400
Committer: Rob Richards rricha...@php.net  Thu, 9 Aug 2012 14:02:33 -0400
Parents:   ed793b2a3f857fd49c0c1b036062140da5b3e674
Branches:  PHP-5.3 PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=c4b26cc1b0b0521c75e653fffec2a9e3b4bf8cbb

Log:
Update to work with libxml 2.9.0

Changed paths:
  M  ext/dom/documenttype.c
  M  ext/dom/node.c
  M  ext/simplexml/simplexml.c


Diff:
diff --git a/ext/dom/documenttype.c b/ext/dom/documenttype.c
index d61ba79..eee3b5f 100644
--- a/ext/dom/documenttype.c
+++ b/ext/dom/documenttype.c
@@ -205,7 +205,11 @@ int dom_documenttype_internal_subset_read(dom_object *obj, 
zval **retval TSRMLS_
if (buff != NULL) {
xmlNodeDumpOutput (buff, NULL, (xmlNodePtr) intsubset, 
0, 0, NULL);
xmlOutputBufferFlush(buff);
+#ifdef LIBXML2_NEW_BUFFER
+   ZVAL_STRINGL(*retval, xmlOutputBufferGetContent(buff), 
xmlOutputBufferGetSize(buff), 1);
+#else
ZVAL_STRINGL(*retval, buff-buffer-content, 
buff-buffer-use, 1);
+#endif
(void)xmlOutputBufferClose(buff);
return SUCCESS;
}
diff --git a/ext/dom/node.c b/ext/dom/node.c
index 5bcb234..727d1bc 100644
--- a/ext/dom/node.c
+++ b/ext/dom/node.c
@@ -1895,9 +1895,17 @@ static void 
dom_canonicalization(INTERNAL_FUNCTION_PARAMETERS, int mode) /* {{{
 RETVAL_FALSE;
 } else {
if (mode == 0) {
+#ifdef LIBXML2_NEW_BUFFER
+   ret = xmlOutputBufferGetSize(buf);
+#else
ret = buf-buffer-use;
+#endif
if (ret  0) {
+#ifdef LIBXML2_NEW_BUFFER
+   RETVAL_STRINGL((char *) 
xmlOutputBufferGetContent(buf), ret, 1);
+#else
RETVAL_STRINGL((char *) buf-buffer-content, 
ret, 1);
+#endif
} else {
RETVAL_EMPTY_STRING();
}
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c
index a379111..2368596 100644
--- a/ext/simplexml/simplexml.c
+++ b/ext/simplexml/simplexml.c
@@ -1387,7 +1387,11 @@ SXE_METHOD(asXML)
 
xmlNodeDumpOutput(outbuf, (xmlDocPtr) 
sxe-document-ptr, node, 0, 0, ((xmlDocPtr) sxe-document-ptr)-encoding);
xmlOutputBufferFlush(outbuf);
+#ifdef LIBXML2_NEW_BUFFER
+   RETVAL_STRINGL((char 
*)xmlOutputBufferGetContent(outbuf), xmlOutputBufferGetSize(outbuf), 1);
+#else
RETVAL_STRINGL((char *)outbuf-buffer-content, 
outbuf-buffer-use, 1);
+#endif
xmlOutputBufferClose(outbuf);
}
} else {


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] com php-src: Merge branch 'PHP-5.3' into PHP-5.4: ext/dom/node.c ext/simplexml/simplexml.c

2012-08-09 Thread Rob Richards
Commit:c5a611b25708d709ad5c539ed764e2a268fd04a7
Author:Rob Richards rricha...@php.net Thu, 9 Aug 2012 14:24:50 
-0400
Parents:   c98a51a169956f3cf5f1f2eade053a38549c7315 
c4b26cc1b0b0521c75e653fffec2a9e3b4bf8cbb
Branches:  PHP-5.4 master

Link:   
http://git.php.net/?p=php-src.git;a=commitdiff;h=c5a611b25708d709ad5c539ed764e2a268fd04a7

Log:
Merge branch 'PHP-5.3' into PHP-5.4

# By Daniel Veillard
* PHP-5.3:
  Update to work with libxml 2.9.0

Changed paths:
  MM  ext/dom/node.c
  MM  ext/simplexml/simplexml.c


Diff:



--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/libxml/libxml.c trunk/ext/libxml/libxml.c

2011-09-02 Thread Rob Richards
I finally got a chance to look at the code. Any reason you didn't just 
manage everything in a per request state similar to the other global 
function usage? You might even be able to get away with only 
initializing it on the first call to setting the loader and you already 
are performing actions in the RSHUTDOWN so no real additional overhead 
taking that approach.


Rob

On 9/2/11 1:14 AM, Gustavo André dos Santos Lopes wrote:

cataphract   Fri, 02 Sep 2011 05:14:32 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=316019

Log:
- Use our external entity loader only in the context of a PHP request.

Changed paths:
 U   php/php-src/branches/PHP_5_4/ext/libxml/libxml.c
 U   php/php-src/trunk/ext/libxml/libxml.c

Modified: php/php-src/branches/PHP_5_4/ext/libxml/libxml.c
===
--- php/php-src/branches/PHP_5_4/ext/libxml/libxml.c2011-09-02 04:55:59 UTC 
(rev 316018)
+++ php/php-src/branches/PHP_5_4/ext/libxml/libxml.c2011-09-02 05:14:32 UTC 
(rev 316019)
@@ -674,6 +674,18 @@
return ret;
  }

+static xmlParserInputPtr _php_libxml_pre_ext_ent_loader(const char *URL,
+   const char *ID, xmlParserCtxtPtr context)
+{
+   /* Check whether we're running in a PHP context, since the entity loader
+* we've defined is an application level (true global) setting */
+   if (xmlGenericError == php_libxml_error_handler) {
+   return _php_libxml_external_entity_loader(URL, ID, context);
+   } else {
+   return _php_libxml_default_entity_loader(URL, ID, context);
+   }
+}
+
  PHP_LIBXML_API void php_libxml_ctx_error(void *ctx, const char *msg, ...)
  {
va_list args;
@@ -713,7 +725,7 @@
xmlInitParser();

_php_libxml_default_entity_loader = 
xmlGetExternalEntityLoader();
-   xmlSetExternalEntityLoader(_php_libxml_external_entity_loader);
+   xmlSetExternalEntityLoader(_php_libxml_pre_ext_ent_loader);

zend_hash_init(php_libxml_exports, 0, NULL, NULL, 1);

@@ -729,6 +741,8 @@
  #endif
xmlCleanupParser();
zend_hash_destroy(php_libxml_exports);
+
+   xmlSetExternalEntityLoader(_php_libxml_default_entity_loader);
_php_libxml_initialized = 0;
}
  }

Modified: php/php-src/trunk/ext/libxml/libxml.c
===
--- php/php-src/trunk/ext/libxml/libxml.c   2011-09-02 04:55:59 UTC (rev 
316018)
+++ php/php-src/trunk/ext/libxml/libxml.c   2011-09-02 05:14:32 UTC (rev 
316019)
@@ -674,6 +674,18 @@
return ret;
  }

+static xmlParserInputPtr _php_libxml_pre_ext_ent_loader(const char *URL,
+   const char *ID, xmlParserCtxtPtr context)
+{
+   /* Check whether we're running in a PHP context, since the entity loader
+* we've defined is an application level (true global) setting */
+   if (xmlGenericError == php_libxml_error_handler) {
+   return _php_libxml_external_entity_loader(URL, ID, context);
+   } else {
+   return _php_libxml_default_entity_loader(URL, ID, context);
+   }
+}
+
  PHP_LIBXML_API void php_libxml_ctx_error(void *ctx, const char *msg, ...)
  {
va_list args;
@@ -713,7 +725,7 @@
xmlInitParser();

_php_libxml_default_entity_loader = 
xmlGetExternalEntityLoader();
-   xmlSetExternalEntityLoader(_php_libxml_external_entity_loader);
+   xmlSetExternalEntityLoader(_php_libxml_pre_ext_ent_loader);

zend_hash_init(php_libxml_exports, 0, NULL, NULL, 1);

@@ -729,6 +741,8 @@
  #endif
xmlCleanupParser();
zend_hash_destroy(php_libxml_exports);
+
+   xmlSetExternalEntityLoader(_php_libxml_default_entity_loader);
_php_libxml_initialized = 0;
}
  }







Re: [PHP-CVS] svn: /php/php-src/ branches/PHP_5_4/ext/libxml/libxml.c branches/PHP_5_4/ext/libxml/php_libxml.h trunk/ext/libxml/libxml.c trunk/ext/libxml/php_libxml.h

2011-08-30 Thread Rob Richards
I don't have a computer right now to see what you wrote for this, but we 
cannot use any of the global methods unless you have protection built in 
to only execute if within the context of a PHP call. Easiest way to see 
the conflict is by running both mod_php and mod_perl.


Rob

On 8/29/11 9:08 PM, Gustavo André dos Santos Lopes wrote:

cataphract   Tue, 30 Aug 2011 01:08:22 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=315752

Log:
- Turns out the external entity loader is not a per-thread global but a true
   global. Changed code accordingly; however, applications that embed PHP and
   also use libxml2 may be affected negatively.

Changed paths:
 U   php/php-src/branches/PHP_5_4/ext/libxml/libxml.c
 U   php/php-src/branches/PHP_5_4/ext/libxml/php_libxml.h
 U   php/php-src/trunk/ext/libxml/libxml.c
 U   php/php-src/trunk/ext/libxml/php_libxml.h







[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/pdo_mysql/mysql_driver.c branches/PHP_5_3/ext/pdo_mysql/pdo_mysql.c branches/PHP_5_3/ext/pdo_mysql/php_pdo_mysql_int.h trunk/ext

2011-04-15 Thread Rob Richards
rrichardsFri, 15 Apr 2011 14:24:40 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=310239

Log:
Implement FR #48587 (MySQL PDO driver doesn't support SSL connections)

Bug: http://bugs.php.net/48587 (Assigned) MySQL PDO driver doesn't support SSL 
connections
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/pdo_mysql/mysql_driver.c
U   php/php-src/branches/PHP_5_3/ext/pdo_mysql/pdo_mysql.c
U   php/php-src/branches/PHP_5_3/ext/pdo_mysql/php_pdo_mysql_int.h
U   php/php-src/trunk/ext/pdo_mysql/mysql_driver.c
U   php/php-src/trunk/ext/pdo_mysql/pdo_mysql.c
U   php/php-src/trunk/ext/pdo_mysql/php_pdo_mysql_int.h

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2011-04-15 14:21:20 UTC (rev 310238)
+++ php/php-src/branches/PHP_5_3/NEWS   2011-04-15 14:24:40 UTC (rev 310239)
@@ -64,6 +64,10 @@
   . Fixed bug #54167 (PDO_DBLIB returns null on SQLUNIQUE field).
 (mjh at hodginsmedia dot com, Felipe)

+- PDO MySQL driver:
+  . Implemented FR #48587 (MySQL PDO driver doesn't support SSL connections).
+(Rob)
+
 - PDO PostgreSQL driver:
   . Fixed bug #54318 (Non-portable grep option used in PDO pgsql
 configuration). (bwalton at artsci dot utoronto dot ca)

Modified: php/php-src/branches/PHP_5_3/ext/pdo_mysql/mysql_driver.c
===
--- php/php-src/branches/PHP_5_3/ext/pdo_mysql/mysql_driver.c   2011-04-15 
14:21:20 UTC (rev 310238)
+++ php/php-src/branches/PHP_5_3/ext/pdo_mysql/mysql_driver.c   2011-04-15 
14:24:40 UTC (rev 310239)
@@ -625,6 +625,9 @@
char *default_file = NULL, *default_group = NULL;
long compress = 0;
 #endif
+#if HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSLQND
+   char *ssl_key = NULL, *ssl_cert = NULL, *ssl_ca = NULL, 
*ssl_capath = NULL, *ssl_cipher = NULL;
+#endif
H-buffered = pdo_attr_lval(driver_options, 
PDO_MYSQL_ATTR_USE_BUFFERED_QUERY, 1 TSRMLS_CC);

H-emulate_prepare = pdo_attr_lval(driver_options,
@@ -709,6 +712,32 @@
}
}
 #endif
+#if HAVE_MYSQL_STMT_PREPARE || PDO_USE_MYSLQND
+   ssl_key = pdo_attr_strval(driver_options, 
PDO_MYSQL_ATTR_SSL_KEY, NULL TSRMLS_CC);
+   ssl_cert = pdo_attr_strval(driver_options, 
PDO_MYSQL_ATTR_SSL_CERT, NULL TSRMLS_CC);
+   ssl_ca = pdo_attr_strval(driver_options, PDO_MYSQL_ATTR_SSL_CA, 
NULL TSRMLS_CC);
+   ssl_capath = pdo_attr_strval(driver_options, 
PDO_MYSQL_ATTR_SSL_CAPATH, NULL TSRMLS_CC);
+   ssl_cipher = pdo_attr_strval(driver_options, 
PDO_MYSQL_ATTR_SSL_CIPHER, NULL TSRMLS_CC);
+
+   if (ssl_key || ssl_cert || ssl_ca || ssl_capath || ssl_cipher) {
+   mysql_ssl_set(H-server, ssl_key, ssl_cert, ssl_ca, 
ssl_capath, ssl_cipher);
+   if (ssl_key) {
+   efree(ssl_key);
+   }
+   if (ssl_cert) {
+   efree(ssl_cert);
+   }
+   if (ssl_ca) {
+   efree(ssl_ca);
+   }
+   if (ssl_capath) {
+   efree(ssl_capath);
+   }
+   if (ssl_cipher) {
+   efree(ssl_cipher);
+   }
+   }
+#endif
}

 #ifdef PDO_MYSQL_HAS_CHARSET

Modified: php/php-src/branches/PHP_5_3/ext/pdo_mysql/pdo_mysql.c
===
--- php/php-src/branches/PHP_5_3/ext/pdo_mysql/pdo_mysql.c  2011-04-15 
14:21:20 UTC (rev 310238)
+++ php/php-src/branches/PHP_5_3/ext/pdo_mysql/pdo_mysql.c  2011-04-15 
14:24:40 UTC (rev 310239)
@@ -79,7 +79,11 @@
REGISTER_PDO_CLASS_CONST_LONG(MYSQL_ATTR_DIRECT_QUERY, 
(long)PDO_MYSQL_ATTR_DIRECT_QUERY);
REGISTER_PDO_CLASS_CONST_LONG(MYSQL_ATTR_FOUND_ROWS, 
(long)PDO_MYSQL_ATTR_FOUND_ROWS);
REGISTER_PDO_CLASS_CONST_LONG(MYSQL_ATTR_IGNORE_SPACE, 
(long)PDO_MYSQL_ATTR_IGNORE_SPACE);
-
+   REGISTER_PDO_CLASS_CONST_LONG(MYSQL_ATTR_SSL_KEY, 
(long)PDO_MYSQL_ATTR_SSL_KEY);
+   REGISTER_PDO_CLASS_CONST_LONG(MYSQL_ATTR_SSL_CERT, 
(long)PDO_MYSQL_ATTR_SSL_CERT);
+   REGISTER_PDO_CLASS_CONST_LONG(MYSQL_ATTR_SSL_CA, 
(long)PDO_MYSQL_ATTR_SSL_CA);
+   REGISTER_PDO_CLASS_CONST_LONG(MYSQL_ATTR_SSL_CAPATH, 
(long)PDO_MYSQL_ATTR_SSL_CAPATH);
+   REGISTER_PDO_CLASS_CONST_LONG(MYSQL_ATTR_SSL_CIPHER, 
(long)PDO_MYSQL_ATTR_SSL_CIPHER);
return php_pdo_register_driver(pdo_mysql_driver);
 }
 /* }}} */

Modified: php/php-src/branches/PHP_5_3/ext/pdo_mysql/php_pdo_mysql_int.h

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/simplexml/simplexml.c trunk/ext/simplexml/simplexml.c

2010-12-27 Thread Rob Richards
rrichardsMon, 27 Dec 2010 18:57:49 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=306759

Log:
fix crash with entity declarations

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/simplexml/simplexml.c
U   php/php-src/trunk/ext/simplexml/simplexml.c

Modified: php/php-src/branches/PHP_5_3/ext/simplexml/simplexml.c
===
--- php/php-src/branches/PHP_5_3/ext/simplexml/simplexml.c  2010-12-27 
17:17:43 UTC (rev 306758)
+++ php/php-src/branches/PHP_5_3/ext/simplexml/simplexml.c  2010-12-27 
18:57:49 UTC (rev 306759)
@@ -1099,22 +1099,24 @@
if (sxe-iter.type == SXE_ITER_ELEMENT) {
node = php_sxe_get_first_node(sxe, node TSRMLS_CC);
}
-   attr = node ? (xmlAttrPtr)node-properties : NULL;
-   zattr = NULL;
-   test = sxe-iter.name  sxe-iter.type == SXE_ITER_ATTRLIST;
-   while (attr) {
-   if ((!test || !xmlStrcmp(attr-name, sxe-iter.name)) 
 match_ns(sxe, (xmlNodePtr)attr, sxe-iter.nsprefix, sxe-iter.isprefix)) {
-   MAKE_STD_ZVAL(value);
-   ZVAL_STRING(value, 
sxe_xmlNodeListGetString((xmlDocPtr) sxe-document-ptr, attr-children, 1), 0);
-   namelen = xmlStrlen(attr-name) + 1;
-   if (!zattr) {
-   MAKE_STD_ZVAL(zattr);
-   array_init(zattr);
-   sxe_properties_add(rv, @attributes, 
sizeof(@attributes), zattr TSRMLS_CC);
+   if (node-tpye != XML_ENTITY_DECL) {
+   attr = node ? (xmlAttrPtr)node-properties : NULL;
+   zattr = NULL;
+   test = sxe-iter.name  sxe-iter.type == 
SXE_ITER_ATTRLIST;
+   while (attr) {
+   if ((!test || !xmlStrcmp(attr-name, 
sxe-iter.name))  match_ns(sxe, (xmlNodePtr)attr, sxe-iter.nsprefix, 
sxe-iter.isprefix)) {
+   MAKE_STD_ZVAL(value);
+   ZVAL_STRING(value, 
sxe_xmlNodeListGetString((xmlDocPtr) sxe-document-ptr, attr-children, 1), 0);
+   namelen = xmlStrlen(attr-name) + 1;
+   if (!zattr) {
+   MAKE_STD_ZVAL(zattr);
+   array_init(zattr);
+   sxe_properties_add(rv, 
@attributes, sizeof(@attributes), zattr TSRMLS_CC);
+   }
+   add_assoc_zval_ex(zattr, 
(char*)attr-name, namelen, value);
}
-   add_assoc_zval_ex(zattr, (char*)attr-name, 
namelen, value);
+   attr = attr-next;
}
-   attr = attr-next;
}
}


Modified: php/php-src/trunk/ext/simplexml/simplexml.c
===
--- php/php-src/trunk/ext/simplexml/simplexml.c 2010-12-27 17:17:43 UTC (rev 
306758)
+++ php/php-src/trunk/ext/simplexml/simplexml.c 2010-12-27 18:57:49 UTC (rev 
306759)
@@ -1099,22 +1099,24 @@
if (sxe-iter.type == SXE_ITER_ELEMENT) {
node = php_sxe_get_first_node(sxe, node TSRMLS_CC);
}
-   attr = node ? (xmlAttrPtr)node-properties : NULL;
-   zattr = NULL;
-   test = sxe-iter.name  sxe-iter.type == SXE_ITER_ATTRLIST;
-   while (attr) {
-   if ((!test || !xmlStrcmp(attr-name, sxe-iter.name)) 
 match_ns(sxe, (xmlNodePtr)attr, sxe-iter.nsprefix, sxe-iter.isprefix)) {
-   MAKE_STD_ZVAL(value);
-   ZVAL_STRING(value, 
sxe_xmlNodeListGetString((xmlDocPtr) sxe-document-ptr, attr-children, 1), 0);
-   namelen = xmlStrlen(attr-name) + 1;
-   if (!zattr) {
-   MAKE_STD_ZVAL(zattr);
-   array_init(zattr);
-   sxe_properties_add(rv, @attributes, 
sizeof(@attributes), zattr TSRMLS_CC);
+   if (node-tpye != XML_ENTITY_DECL) {
+   attr = node ? (xmlAttrPtr)node-properties : NULL;
+   zattr = NULL;
+   test = sxe-iter.name  sxe-iter.type == 
SXE_ITER_ATTRLIST;
+   while (attr) {
+   if ((!test || !xmlStrcmp(attr-name, 
sxe-iter.name))  match_ns(sxe, (xmlNodePtr)attr, sxe-iter.nsprefix, 
sxe-iter.isprefix)) {
+  

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/ext/simplexml/simplexml.c trunk/ext/simplexml/simplexml.c

2010-12-27 Thread Rob Richards
rrichardsMon, 27 Dec 2010 19:00:13 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=306760

Log:
typo

Changed paths:
U   php/php-src/branches/PHP_5_3/ext/simplexml/simplexml.c
U   php/php-src/trunk/ext/simplexml/simplexml.c

Modified: php/php-src/branches/PHP_5_3/ext/simplexml/simplexml.c
===
--- php/php-src/branches/PHP_5_3/ext/simplexml/simplexml.c  2010-12-27 
18:57:49 UTC (rev 306759)
+++ php/php-src/branches/PHP_5_3/ext/simplexml/simplexml.c  2010-12-27 
19:00:13 UTC (rev 306760)
@@ -1099,7 +1099,7 @@
if (sxe-iter.type == SXE_ITER_ELEMENT) {
node = php_sxe_get_first_node(sxe, node TSRMLS_CC);
}
-   if (node-tpye != XML_ENTITY_DECL) {
+   if (node-type != XML_ENTITY_DECL) {
attr = node ? (xmlAttrPtr)node-properties : NULL;
zattr = NULL;
test = sxe-iter.name  sxe-iter.type == 
SXE_ITER_ATTRLIST;

Modified: php/php-src/trunk/ext/simplexml/simplexml.c
===
--- php/php-src/trunk/ext/simplexml/simplexml.c 2010-12-27 18:57:49 UTC (rev 
306759)
+++ php/php-src/trunk/ext/simplexml/simplexml.c 2010-12-27 19:00:13 UTC (rev 
306760)
@@ -1099,7 +1099,7 @@
if (sxe-iter.type == SXE_ITER_ELEMENT) {
node = php_sxe_get_first_node(sxe, node TSRMLS_CC);
}
-   if (node-tpye != XML_ENTITY_DECL) {
+   if (node-type != XML_ENTITY_DECL) {
attr = node ? (xmlAttrPtr)node-properties : NULL;
zattr = NULL;
test = sxe-iter.name  sxe-iter.type == 
SXE_ITER_ATTRLIST;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/simplexml/simplexml.c branches/PHP_5_2/ext/simplexml/tests/bug48601.phpt branches/PHP_5_3/NEWS branches/PHP_5_3/ext/simplexml/si

2010-05-05 Thread Rob Richards
rrichardsWed, 05 May 2010 11:40:11 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=299016

Log:
fix bug #48601 (xpath() returns FALSE for legitimate query)
add test

Bug: http://bugs.php.net/48601 (Open) xpath() returns FALSE for legitimate query
  
Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS
U   php/php-src/branches/PHP_5_2/ext/simplexml/simplexml.c
A   php/php-src/branches/PHP_5_2/ext/simplexml/tests/bug48601.phpt
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/simplexml/simplexml.c
A   php/php-src/branches/PHP_5_3/ext/simplexml/tests/bug48601.phpt
U   php/php-src/trunk/ext/simplexml/simplexml.c
A   php/php-src/trunk/ext/simplexml/tests/bug48601.phpt

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS	2010-05-05 10:54:53 UTC (rev 299015)
+++ php/php-src/branches/PHP_5_2/NEWS	2010-05-05 11:40:11 UTC (rev 299016)
@@ -68,6 +68,7 @@
 - Fixed bug #49723 (LimitIterator with empty SeekableIterator). (Etienne)
 - Fixed bug #49576 (FILTER_VALIDATE_EMAIL filter needs updating) (Rasmus)
 - Fixed bug #49267 (Linking fails for iconv). (Moriyosh)
+- Fixed bug #48601 (xpath() returns FALSE for legitimate query). (Rob)
 - Fixed bug #48289 (iconv_mime_encode() quoted-printable scheme is broken).
   (Adam, patch from hiroaki dot kawai at gmail dot com).
 - Fixed bug #43314 (iconv_mime_encode(), broken Q scheme). (Rasmus)

Modified: php/php-src/branches/PHP_5_2/ext/simplexml/simplexml.c
===
--- php/php-src/branches/PHP_5_2/ext/simplexml/simplexml.c	2010-05-05 10:54:53 UTC (rev 299015)
+++ php/php-src/branches/PHP_5_2/ext/simplexml/simplexml.c	2010-05-05 11:40:11 UTC (rev 299016)
@@ -1219,31 +1219,29 @@
 	}

 	result = retval-nodesetval;
-	if (!result) {
-		xmlXPathFreeObject(retval);
-		RETURN_FALSE;
-	}

 	array_init(return_value);

-	for (i = 0; i  result-nodeNr; ++i) {
-		nodeptr = result-nodeTab[i];
-		if (nodeptr-type == XML_TEXT_NODE || nodeptr-type == XML_ELEMENT_NODE || nodeptr-type == XML_ATTRIBUTE_NODE) {
-			MAKE_STD_ZVAL(value);
-			/**
-			 * Detect the case where the last selector is text(), simplexml
-			 * always accesses the text() child by default, therefore we assign
-			 * to the parent node.
-			 */
-			if (nodeptr-type == XML_TEXT_NODE) {
-_node_as_zval(sxe, nodeptr-parent, value, SXE_ITER_NONE, NULL, NULL, 0 TSRMLS_CC);
-			} else if (nodeptr-type == XML_ATTRIBUTE_NODE) {
-_node_as_zval(sxe, nodeptr-parent, value, SXE_ITER_ATTRLIST, (char*)nodeptr-name, nodeptr-ns ? (xmlChar *)nodeptr-ns-href : NULL, 0 TSRMLS_CC);
-			} else {
-_node_as_zval(sxe, nodeptr, value, SXE_ITER_NONE, NULL, NULL, 0 TSRMLS_CC);
-			}
+	if (result != NULL) {
+		for (i = 0; i  result-nodeNr; ++i) {
+			nodeptr = result-nodeTab[i];
+			if (nodeptr-type == XML_TEXT_NODE || nodeptr-type == XML_ELEMENT_NODE || nodeptr-type == XML_ATTRIBUTE_NODE) {
+MAKE_STD_ZVAL(value);
+/**
+ * Detect the case where the last selector is text(), simplexml
+ * always accesses the text() child by default, therefore we assign
+ * to the parent node.
+ */
+if (nodeptr-type == XML_TEXT_NODE) {
+	_node_as_zval(sxe, nodeptr-parent, value, SXE_ITER_NONE, NULL, NULL, 0 TSRMLS_CC);
+} else if (nodeptr-type == XML_ATTRIBUTE_NODE) {
+	_node_as_zval(sxe, nodeptr-parent, value, SXE_ITER_ATTRLIST, (char*)nodeptr-name, nodeptr-ns ? (xmlChar *)nodeptr-ns-href : NULL, 0 TSRMLS_CC);
+} else {
+	_node_as_zval(sxe, nodeptr, value, SXE_ITER_NONE, NULL, NULL, 0 TSRMLS_CC);
+}

-			add_next_index_zval(return_value, value);
+add_next_index_zval(return_value, value);
+			}
 		}
 	}


Added: php/php-src/branches/PHP_5_2/ext/simplexml/tests/bug48601.phpt
===
--- php/php-src/branches/PHP_5_2/ext/simplexml/tests/bug48601.phpt	(rev 0)
+++ php/php-src/branches/PHP_5_2/ext/simplexml/tests/bug48601.phpt	2010-05-05 11:40:11 UTC (rev 299016)
@@ -0,0 +1,20 @@
+--TEST--
+Bug #48601 (xpath() returns FALSE for legitimate query)
+--SKIPIF--
+?php if (!extension_loaded(simplexml)) print skip; ?
+--FILE--
+?php
+
+$sxe = simplexml_load_string('rootnode11/node1/root');
+
+$nodes = $sxe-xpath(/root/node2/@test);
+
+if (! is_array($nodes)) {
+echo An error occured\n;
+} else {
+   echo Result Count:  . count($nodes) . \n;
+}
+
+?
+--EXPECTF--
+Result Count: 0

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS	2010-05-05 10:54:53 UTC (rev 299015)
+++ php/php-src/branches/PHP_5_3/NEWS	2010-05-05 11:40:11 UTC (rev 299016)
@@ -137,6 +137,7 @@
 - Fixed bug #48983 (DomDocument : saveHTMLFile wrong charset). (Rob)
 - Fixed bug #48902 (Timezone database fallback map 

[PHP-CVS] svn: /php/php-src/trunk/sapi/apache2handler/ sapi_apache2.c

2010-05-04 Thread Rob Richards
rrichardsTue, 04 May 2010 12:12:28 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=298966

Log:
fix non-windows builds

Changed paths:
U   php/php-src/trunk/sapi/apache2handler/sapi_apache2.c

Modified: php/php-src/trunk/sapi/apache2handler/sapi_apache2.c
===
--- php/php-src/trunk/sapi/apache2handler/sapi_apache2.c2010-05-04 
11:59:54 UTC (rev 298965)
+++ php/php-src/trunk/sapi/apache2handler/sapi_apache2.c2010-05-04 
12:12:28 UTC (rev 298966)
@@ -53,8 +53,10 @@

 #include php_apache.h

-#if _MSC_VER = 1300
-# include win32/php_strtoi64.h
+#ifdef PHP_WIN32
+# if _MSC_VER = 1300
+#  include win32/php_strtoi64.h
+# endif
 #endif

 /* UnixWare and Netware define shutdown to _shutdown, which causes problems 
later

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/dom/php_dom.c trunk/ext/dom/php_dom.c

2010-05-04 Thread Rob Richards
rrichardsTue, 04 May 2010 12:55:26 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=298967

Log:
fix bug #51721 (mark DOMNodeList and DOMNamedNodeMap as Traversable)

Bug: http://bugs.php.net/51721 (Open) Patch: mark DOMNodeList and 
DOMNamedNodeMap as Traversable
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/dom/php_dom.c
U   php/php-src/trunk/ext/dom/php_dom.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2010-05-04 12:12:28 UTC (rev 298966)
+++ php/php-src/branches/PHP_5_3/NEWS   2010-05-04 12:55:26 UTC (rev 298967)
@@ -43,6 +43,8 @@
   (Pierre)
 - Fixed bug #51723 (Content-length header is limited to 32bit integer with
   Apache2 on Windows). (Pierre)
+- Fixed bug #51721 (mark DOMNodeList and DOMNamedNodeMap as Traversable).
+  (David Zuelke)
 - Fixed bug #51690 (Phar::setStub looks for case-sensitive
   __HALT_COMPILER()). (Ilia)
 - Fixed bug #51688 (ini per dir crashes when invalid document root  are given).

Modified: php/php-src/branches/PHP_5_3/ext/dom/php_dom.c
===
--- php/php-src/branches/PHP_5_3/ext/dom/php_dom.c  2010-05-04 12:12:28 UTC 
(rev 298966)
+++ php/php-src/branches/PHP_5_3/ext/dom/php_dom.c  2010-05-04 12:55:26 UTC 
(rev 298967)
@@ -29,6 +29,7 @@
 #include ext/standard/php_rand.h
 #include php_dom.h
 #include dom_properties.h
+#include zend_interfaces.h

 #include ext/standard/info.h
 #define PHP_XPATH 1
@@ -680,6 +681,7 @@
ce.create_object = dom_nnodemap_objects_new;
dom_nodelist_class_entry = zend_register_internal_class_ex(ce, NULL, 
NULL TSRMLS_CC);
dom_nodelist_class_entry-get_iterator = php_dom_get_iterator;
+   zend_class_implements(dom_nodelist_class_entry TSRMLS_CC, 1, 
zend_ce_traversable);

zend_hash_init(dom_nodelist_prop_handlers, 0, NULL, NULL, 1);
dom_register_prop_handler(dom_nodelist_prop_handlers, length, 
dom_nodelist_length_read, NULL TSRMLS_CC);
@@ -689,6 +691,7 @@
ce.create_object = dom_nnodemap_objects_new;
dom_namednodemap_class_entry = zend_register_internal_class_ex(ce, 
NULL, NULL TSRMLS_CC);
dom_namednodemap_class_entry-get_iterator = php_dom_get_iterator;
+   zend_class_implements(dom_namednodemap_class_entry TSRMLS_CC, 1, 
zend_ce_traversable);

zend_hash_init(dom_namednodemap_prop_handlers, 0, NULL, NULL, 1);
dom_register_prop_handler(dom_namednodemap_prop_handlers, length, 
dom_namednodemap_length_read, NULL TSRMLS_CC);

Modified: php/php-src/trunk/ext/dom/php_dom.c
===
--- php/php-src/trunk/ext/dom/php_dom.c 2010-05-04 12:12:28 UTC (rev 298966)
+++ php/php-src/trunk/ext/dom/php_dom.c 2010-05-04 12:55:26 UTC (rev 298967)
@@ -29,6 +29,7 @@
 #include ext/standard/php_rand.h
 #include php_dom.h
 #include dom_properties.h
+#include zend_interfaces.h

 #include ext/standard/info.h
 #define PHP_XPATH 1
@@ -680,6 +681,7 @@
ce.create_object = dom_nnodemap_objects_new;
dom_nodelist_class_entry = zend_register_internal_class_ex(ce, NULL, 
NULL TSRMLS_CC);
dom_nodelist_class_entry-get_iterator = php_dom_get_iterator;
+   zend_class_implements(dom_nodelist_class_entry TSRMLS_CC, 1, 
zend_ce_traversable);

zend_hash_init(dom_nodelist_prop_handlers, 0, NULL, NULL, 1);
dom_register_prop_handler(dom_nodelist_prop_handlers, length, 
dom_nodelist_length_read, NULL TSRMLS_CC);
@@ -689,6 +691,7 @@
ce.create_object = dom_nnodemap_objects_new;
dom_namednodemap_class_entry = zend_register_internal_class_ex(ce, 
NULL, NULL TSRMLS_CC);
dom_namednodemap_class_entry-get_iterator = php_dom_get_iterator;
+   zend_class_implements(dom_namednodemap_class_entry TSRMLS_CC, 1, 
zend_ce_traversable);

zend_hash_init(dom_namednodemap_prop_handlers, 0, NULL, NULL, 1);
dom_register_prop_handler(dom_namednodemap_prop_handlers, length, 
dom_namednodemap_length_read, NULL TSRMLS_CC);

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/dom/tests/bug49490.phpt branches/PHP_5_3/ext/dom/xpath.c trunk/ext/dom/tests/bug49490.phpt trunk/ext/dom/xpath.c

2010-05-04 Thread Rob Richards
rrichardsTue, 04 May 2010 15:41:49 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=298974

Log:
fix bug #49490 (XPath namespace prefix conflict)
add test

Bug: http://bugs.php.net/49490 (Assigned) XPath namespace prefix conflict
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
A   php/php-src/branches/PHP_5_3/ext/dom/tests/bug49490.phpt
U   php/php-src/branches/PHP_5_3/ext/dom/xpath.c
A   php/php-src/trunk/ext/dom/tests/bug49490.phpt
U   php/php-src/trunk/ext/dom/xpath.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2010-05-04 15:11:41 UTC (rev 298973)
+++ php/php-src/branches/PHP_5_3/NEWS   2010-05-04 15:41:49 UTC (rev 298974)
@@ -126,6 +126,7 @@
 - Fixed bug #49700 (memory leaks in php_date.c if garbage collector is
   enabled). (Dmitry)
 - Fixed bug #49576 (FILTER_VALIDATE_EMAIL filter needs updating) (Rasmus)
+- Fixed bug #49490 (XPath namespace prefix conflict). (Rob)
 - Fixed bug #49429 (odbc_autocommit doesn't work). (Felipe)
 - Fixed bug #49234 (mysqli_ssl_set not found). (Andrey)
 - Fixed bug #49192 (PHP crashes when GC invoked on COM object). (Stas)

Added: php/php-src/branches/PHP_5_3/ext/dom/tests/bug49490.phpt
===
--- php/php-src/branches/PHP_5_3/ext/dom/tests/bug49490.phpt
(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/dom/tests/bug49490.phpt2010-05-04 
15:41:49 UTC (rev 298974)
@@ -0,0 +1,17 @@
+--TEST--
+Bug #49490 (XPath namespace prefix conflict).
+--SKIPIF--
+?php require_once('skipif.inc'); ?
+--FILE--
+?php
+$doc = new DOMDocument();
+$doc-loadXML('prefix:root xmlns:prefix=urn:a /');
+
+$xp = new DOMXPath($doc);
+$xp-registerNamespace('prefix', 'urn:b');
+
+echo($xp-query('//prefix:root', null, false)-length . \n);
+
+?
+--EXPECT--
+0

Modified: php/php-src/branches/PHP_5_3/ext/dom/xpath.c
===
--- php/php-src/branches/PHP_5_3/ext/dom/xpath.c2010-05-04 15:11:41 UTC 
(rev 298973)
+++ php/php-src/branches/PHP_5_3/ext/dom/xpath.c2010-05-04 15:41:49 UTC 
(rev 298974)
@@ -48,12 +48,14 @@

 ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_xpath_query, 0, 0, 1)
ZEND_ARG_INFO(0, expr)
-   ZEND_ARG_OBJ_INFO(0, context, DOMNode, 0)
+   ZEND_ARG_OBJ_INFO(0, context, DOMNode, 1)
+   ZEND_ARG_INFO(0, registerNodeNS)
 ZEND_END_ARG_INFO();

 ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_xpath_evaluate, 0, 0, 1)
ZEND_ARG_INFO(0, expr)
-   ZEND_ARG_OBJ_INFO(0, context, DOMNode, 0)
+   ZEND_ARG_OBJ_INFO(0, context, DOMNode, 1)
+   ZEND_ARG_INFO(0, registerNodeNS)
 ZEND_END_ARG_INFO();

 ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_xpath_register_php_functions, 0, 0, 0)
@@ -385,9 +387,10 @@
dom_object *nodeobj;
char *expr;
xmlDoc *docp = NULL;
-   xmlNsPtr *ns;
+   xmlNsPtr *ns = NULL;
+   zend_bool register_node_ns = 1;

-   if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), 
Os|O, id, dom_xpath_class_entry, expr, expr_len, context, 
dom_node_class_entry) == FAILURE) {
+   if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), 
Os|O!b, id, dom_xpath_class_entry, expr, expr_len, context, 
dom_node_class_entry, register_node_ns) == FAILURE) {
return;
}

@@ -420,13 +423,15 @@

ctxp-node = nodep;

-   /* Register namespaces in the node */
-   ns = xmlGetNsList(docp, nodep);
+   if (register_node_ns) {
+   /* Register namespaces in the node */
+   ns = xmlGetNsList(docp, nodep);

-if (ns != NULL) {
-while (ns[nsnbr] != NULL)
-   nsnbr++;
-}
+   if (ns != NULL) {
+   while (ns[nsnbr] != NULL)
+   nsnbr++;
+   }
+   }


 ctxp-namespaces = ns;
@@ -518,14 +523,14 @@
 }
 /* }}} */

-/* {{{ proto DOMNodeList dom_xpath_query(string expr [,DOMNode context]); */
+/* {{{ proto DOMNodeList dom_xpath_query(string expr [,DOMNode context [, 
boolean registerNodeNS]]); */
 PHP_FUNCTION(dom_xpath_query)
 {
php_xpath_eval(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_DOM_XPATH_QUERY);
 }
 /* }}} end dom_xpath_query */

-/* {{{ proto mixed dom_xpath_evaluate(string expr [,DOMNode context]); */
+/* {{{ proto mixed dom_xpath_evaluate(string expr [,DOMNode context [, boolean 
registerNodeNS]]); */
 PHP_FUNCTION(dom_xpath_evaluate)
 {
php_xpath_eval(INTERNAL_FUNCTION_PARAM_PASSTHRU, 
PHP_DOM_XPATH_EVALUATE);

Added: php/php-src/trunk/ext/dom/tests/bug49490.phpt
===
--- php/php-src/trunk/ext/dom/tests/bug49490.phpt   
(rev 0)
+++ php/php-src/trunk/ext/dom/tests/bug49490.phpt   2010-05-04 15:41:49 UTC 
(rev 298974)
@@ -0,0 +1,17 @@

Re: [PHP-CVS] svn: /php/php-src/trunk/ ext/bz2/bz2.dsp ext/ctype/ctype.dsp ext/curl/curl.dsp ext/dba/dba.dsp ext/dom/dom.dsp ext/exif/exif.dsp ext/ext_skel_win32.php ext/gd/gd.dsp ext/gettext/gettext.

2010-04-29 Thread Rob Richards

Hi Dmitry,

The discussion was a while ago (Steph was working on a way to 
autogenerate them at the time). Unfortunately it failed miserably 
(buildconf error'd out) when I tried to use it (tried it after the dsps 
had been removed). Until that is working (or some other mechanism is in 
place to generate them), I see no reason to remove them. They easily 
convert to newer VS versions so not specifically for VC6. The project 
files are nice to have around for simple organization/access in VS 
especially since we already have them, so its not so much about using 
them to make a build as it is for the VS integration.


Rob

Hi Rob,

May be I missed the discussion...

I'm not sure if it's a good idea to have all this scarp in SVN.
Personally, I won't support these DSP files just because I don't use 
Visual Studio 6.0 to build php. This method was deprecated for ages. 
I'm also not sure if next php version is going to support VC 6.0 at all.


Thanks. Dmitry.

Rob Richards wrote:

rrichardsWed, 28 Apr 2010 14:41:51 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=298702

Log:
revert change #298288: Remove old dsp/dsw/makefile files

Bug: http://bugs.php.net/298288 (error getting bug information)
  Changed paths:
A + php/php-src/trunk/ext/bz2/bz2.dsp
(from php/php-src/trunk/ext/bz2/bz2.dsp:r298287)
A + php/php-src/trunk/ext/ctype/ctype.dsp
(from php/php-src/trunk/ext/ctype/ctype.dsp:r298287)
A + php/php-src/trunk/ext/curl/curl.dsp
(from php/php-src/trunk/ext/curl/curl.dsp:r298287)
A + php/php-src/trunk/ext/dba/dba.dsp
(from php/php-src/trunk/ext/dba/dba.dsp:r298287)
A + php/php-src/trunk/ext/dom/dom.dsp
(from php/php-src/trunk/ext/dom/dom.dsp:r298287)
A + php/php-src/trunk/ext/exif/exif.dsp
(from php/php-src/trunk/ext/exif/exif.dsp:r298287)
U   php/php-src/trunk/ext/ext_skel_win32.php
A + php/php-src/trunk/ext/gd/gd.dsp
(from php/php-src/trunk/ext/gd/gd.dsp:r298287)
A + php/php-src/trunk/ext/gettext/gettext.dsp
(from php/php-src/trunk/ext/gettext/gettext.dsp:r298287)
A + php/php-src/trunk/ext/iconv/iconv.dsp
(from php/php-src/trunk/ext/iconv/iconv.dsp:r298287)
A + php/php-src/trunk/ext/imap/imap.dsp
(from php/php-src/trunk/ext/imap/imap.dsp:r298287)
A + php/php-src/trunk/ext/interbase/interbase.dsp
(from php/php-src/trunk/ext/interbase/interbase.dsp:r298287)
A + php/php-src/trunk/ext/json/json.dsp
(from php/php-src/trunk/ext/json/json.dsp:r298287)
A + php/php-src/trunk/ext/ldap/ldap.dsp
(from php/php-src/trunk/ext/ldap/ldap.dsp:r298287)
A + php/php-src/trunk/ext/mbstring/mbstring.dsp
(from php/php-src/trunk/ext/mbstring/mbstring.dsp:r298287)
A + php/php-src/trunk/ext/mcrypt/mcrypt.dsp
(from php/php-src/trunk/ext/mcrypt/mcrypt.dsp:r298287)
A + php/php-src/trunk/ext/mssql/mssql.dsp
(from php/php-src/trunk/ext/mssql/mssql.dsp:r298287)
A + php/php-src/trunk/ext/mysql/mysql.dsp
(from php/php-src/trunk/ext/mysql/mysql.dsp:r298287)
A + php/php-src/trunk/ext/mysql/mysql.mak
(from php/php-src/trunk/ext/mysql/mysql.mak:r298287)
A + php/php-src/trunk/ext/mysqli/mysqli.dsp
(from php/php-src/trunk/ext/mysqli/mysqli.dsp:r298287)
A + php/php-src/trunk/ext/oci8/oci8.dsp
(from php/php-src/trunk/ext/oci8/oci8.dsp:r298287)
A + php/php-src/trunk/ext/openssl/openssl.dsp
(from php/php-src/trunk/ext/openssl/openssl.dsp:r298287)
A + php/php-src/trunk/ext/openssl/openssl.mak
(from php/php-src/trunk/ext/openssl/openssl.mak:r298287)
A + php/php-src/trunk/ext/pgsql/pgsql.dsp
(from php/php-src/trunk/ext/pgsql/pgsql.dsp:r298287)
A + php/php-src/trunk/ext/pgsql/pgsql.mak
(from php/php-src/trunk/ext/pgsql/pgsql.mak:r298287)
A + php/php-src/trunk/ext/pspell/pspell.dsp
(from php/php-src/trunk/ext/pspell/pspell.dsp:r298287)
A + php/php-src/trunk/ext/shmop/shmop.dsp
(from php/php-src/trunk/ext/shmop/shmop.dsp:r298287)
A + php/php-src/trunk/ext/simplexml/simplexml.dsp
(from php/php-src/trunk/ext/simplexml/simplexml.dsp:r298287)
A + php/php-src/trunk/ext/skeleton/skeleton.dsp
(from php/php-src/trunk/ext/skeleton/skeleton.dsp:r298287)
A + php/php-src/trunk/ext/snmp/snmp.dsp
(from php/php-src/trunk/ext/snmp/snmp.dsp:r298287)
A + php/php-src/trunk/ext/soap/php_soap.dsp
(from php/php-src/trunk/ext/soap/php_soap.dsp:r298287)
A + php/php-src/trunk/ext/sockets/sockets.dsp
(from php/php-src/trunk/ext/sockets/sockets.dsp:r298287)
A + php/php-src/trunk/ext/sqlite/sqlite.dsp
(from php/php-src/trunk/ext/sqlite/sqlite.dsp:r298287)
A + php/php-src/trunk/ext/sybase_ct/sybase_ct.dsp
(from php/php-src/trunk/ext/sybase_ct/sybase_ct.dsp:r298287)
A + php/php-src/trunk/ext/tidy/tidy.dsp
(from php/php-src/trunk/ext

Re: [PHP-CVS] svn: /php/php-src/trunk/ ext/bz2/bz2.dsp ext/ctype/ctype.dsp ext/curl/curl.dsp ext/dba/dba.dsp ext/dom/dom.dsp ext/exif/exif.dsp ext/ext_skel_win32.php ext/gd/gd.dsp ext/gettext/gettext.

2010-04-29 Thread Rob Richards
Right.  My point is only that we keep them around until we can get the 
automatic generation squared away.


Rob

Dmitry Stogov wrote:

Hi Rob,

The problem is not to have them. The problem is to keep them in 
consistency in case someone adds/removes a file. I like the idea of 
automatic generation much more.


Thanks. Dmitry.

Rob Richards wrote:

Hi Dmitry,

The discussion was a while ago (Steph was working on a way to 
autogenerate them at the time). Unfortunately it failed miserably 
(buildconf error'd out) when I tried to use it (tried it after the 
dsps had been removed). Until that is working (or some other 
mechanism is in place to generate them), I see no reason to remove 
them. They easily convert to newer VS versions so not specifically 
for VC6. The project files are nice to have around for simple 
organization/access in VS especially since we already have them, so 
its not so much about using them to make a build as it is for the VS 
integration.


Rob

Hi Rob,

May be I missed the discussion...

I'm not sure if it's a good idea to have all this scarp in SVN.
Personally, I won't support these DSP files just because I don't use 
Visual Studio 6.0 to build php. This method was deprecated for ages. 
I'm also not sure if next php version is going to support VC 6.0 at 
all.


Thanks. Dmitry.

Rob Richards wrote:
rrichardsWed, 28 Apr 2010 14:41:51 
+


Revision: http://svn.php.net/viewvc?view=revisionrevision=298702

Log:
revert change #298288: Remove old dsp/dsw/makefile files

Bug: http://bugs.php.net/298288 (error getting bug information)
  Changed paths:
A + php/php-src/trunk/ext/bz2/bz2.dsp
(from php/php-src/trunk/ext/bz2/bz2.dsp:r298287)
A + php/php-src/trunk/ext/ctype/ctype.dsp
(from php/php-src/trunk/ext/ctype/ctype.dsp:r298287)
A + php/php-src/trunk/ext/curl/curl.dsp
(from php/php-src/trunk/ext/curl/curl.dsp:r298287)
A + php/php-src/trunk/ext/dba/dba.dsp
(from php/php-src/trunk/ext/dba/dba.dsp:r298287)
A + php/php-src/trunk/ext/dom/dom.dsp
(from php/php-src/trunk/ext/dom/dom.dsp:r298287)
A + php/php-src/trunk/ext/exif/exif.dsp
(from php/php-src/trunk/ext/exif/exif.dsp:r298287)
U   php/php-src/trunk/ext/ext_skel_win32.php
A + php/php-src/trunk/ext/gd/gd.dsp
(from php/php-src/trunk/ext/gd/gd.dsp:r298287)
A + php/php-src/trunk/ext/gettext/gettext.dsp
(from php/php-src/trunk/ext/gettext/gettext.dsp:r298287)
A + php/php-src/trunk/ext/iconv/iconv.dsp
(from php/php-src/trunk/ext/iconv/iconv.dsp:r298287)
A + php/php-src/trunk/ext/imap/imap.dsp
(from php/php-src/trunk/ext/imap/imap.dsp:r298287)
A + php/php-src/trunk/ext/interbase/interbase.dsp
(from php/php-src/trunk/ext/interbase/interbase.dsp:r298287)
A + php/php-src/trunk/ext/json/json.dsp
(from php/php-src/trunk/ext/json/json.dsp:r298287)
A + php/php-src/trunk/ext/ldap/ldap.dsp
(from php/php-src/trunk/ext/ldap/ldap.dsp:r298287)
A + php/php-src/trunk/ext/mbstring/mbstring.dsp
(from php/php-src/trunk/ext/mbstring/mbstring.dsp:r298287)
A + php/php-src/trunk/ext/mcrypt/mcrypt.dsp
(from php/php-src/trunk/ext/mcrypt/mcrypt.dsp:r298287)
A + php/php-src/trunk/ext/mssql/mssql.dsp
(from php/php-src/trunk/ext/mssql/mssql.dsp:r298287)
A + php/php-src/trunk/ext/mysql/mysql.dsp
(from php/php-src/trunk/ext/mysql/mysql.dsp:r298287)
A + php/php-src/trunk/ext/mysql/mysql.mak
(from php/php-src/trunk/ext/mysql/mysql.mak:r298287)
A + php/php-src/trunk/ext/mysqli/mysqli.dsp
(from php/php-src/trunk/ext/mysqli/mysqli.dsp:r298287)
A + php/php-src/trunk/ext/oci8/oci8.dsp
(from php/php-src/trunk/ext/oci8/oci8.dsp:r298287)
A + php/php-src/trunk/ext/openssl/openssl.dsp
(from php/php-src/trunk/ext/openssl/openssl.dsp:r298287)
A + php/php-src/trunk/ext/openssl/openssl.mak
(from php/php-src/trunk/ext/openssl/openssl.mak:r298287)
A + php/php-src/trunk/ext/pgsql/pgsql.dsp
(from php/php-src/trunk/ext/pgsql/pgsql.dsp:r298287)
A + php/php-src/trunk/ext/pgsql/pgsql.mak
(from php/php-src/trunk/ext/pgsql/pgsql.mak:r298287)
A + php/php-src/trunk/ext/pspell/pspell.dsp
(from php/php-src/trunk/ext/pspell/pspell.dsp:r298287)
A + php/php-src/trunk/ext/shmop/shmop.dsp
(from php/php-src/trunk/ext/shmop/shmop.dsp:r298287)
A + php/php-src/trunk/ext/simplexml/simplexml.dsp
(from php/php-src/trunk/ext/simplexml/simplexml.dsp:r298287)
A + php/php-src/trunk/ext/skeleton/skeleton.dsp
(from php/php-src/trunk/ext/skeleton/skeleton.dsp:r298287)
A + php/php-src/trunk/ext/snmp/snmp.dsp
(from php/php-src/trunk/ext/snmp/snmp.dsp:r298287)
A + php/php-src/trunk/ext/soap/php_soap.dsp
(from php/php-src/trunk/ext/soap/php_soap.dsp:r298287)
A + php/php-src/trunk/ext/sockets/sockets.dsp
(from php/php-src

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/dom/php_dom.c trunk/ext/dom/php_dom.c

2010-04-09 Thread Rob Richards
rrichardsFri, 09 Apr 2010 11:34:34 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=297744

Log:
fix bug #50828 (DOMNotation is not subclass of DOMNode)

Bug: http://bugs.php.net/50828 (Open) DOMNotation is not subclass of DOMNode
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/dom/php_dom.c
U   php/php-src/trunk/ext/dom/php_dom.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2010-04-09 10:57:47 UTC (rev 297743)
+++ php/php-src/branches/PHP_5_3/NEWS   2010-04-09 11:34:34 UTC (rev 297744)
@@ -44,6 +44,7 @@
 - Fixed bug #51023 (filter doesn't detect int overflows with GCC 4.4).
   (Raphael Geissert)
 - Fixed bug #50999 (unaligned memory access in dba_fetch()). (Felipe)
+- Fixed bug #50828 (DOMNotation is not subclass of DOMNode). (Rob)
 - Fixed bug #50810 (property_exists does not work for private). (Felipe)
 - Fixed bug #50731 (Inconsistent namespaces sent to functions registered with
   spl_autoload_register). (Felipe)

Modified: php/php-src/branches/PHP_5_3/ext/dom/php_dom.c
===
--- php/php-src/branches/PHP_5_3/ext/dom/php_dom.c  2010-04-09 10:57:47 UTC 
(rev 297743)
+++ php/php-src/branches/PHP_5_3/ext/dom/php_dom.c  2010-04-09 11:34:34 UTC 
(rev 297744)
@@ -777,15 +777,12 @@
zend_hash_merge(dom_documenttype_prop_handlers, 
dom_node_prop_handlers, NULL, NULL, sizeof(dom_prop_handler), 0);
zend_hash_add(classes, ce.name, ce.name_length + 1, 
dom_documenttype_prop_handlers, sizeof(dom_documenttype_prop_handlers), NULL);

-   REGISTER_DOM_CLASS(ce, DOMNotation, NULL, 
php_dom_notation_class_functions, dom_notation_class_entry);
+   REGISTER_DOM_CLASS(ce, DOMNotation, dom_node_class_entry, 
php_dom_notation_class_functions, dom_notation_class_entry);

zend_hash_init(dom_notation_prop_handlers, 0, NULL, NULL, 1);
dom_register_prop_handler(dom_notation_prop_handlers, publicId, 
dom_notation_public_id_read, NULL TSRMLS_CC);
dom_register_prop_handler(dom_notation_prop_handlers, systemId, 
dom_notation_system_id_read, NULL TSRMLS_CC);
-   /* Notation nodes are special */
-   dom_register_prop_handler(dom_notation_prop_handlers, nodeName, 
dom_node_node_name_read, NULL TSRMLS_CC);
-   dom_register_prop_handler(dom_notation_prop_handlers, nodeValue, 
dom_node_node_value_read, dom_node_node_value_write TSRMLS_CC);
-   dom_register_prop_handler(dom_notation_prop_handlers, attributes, 
dom_node_attributes_read, NULL TSRMLS_CC);
+   zend_hash_merge(dom_notation_prop_handlers, dom_node_prop_handlers, 
NULL, NULL, sizeof(dom_prop_handler), 0);
zend_hash_add(classes, ce.name, ce.name_length + 1, 
dom_notation_prop_handlers, sizeof(dom_notation_prop_handlers), NULL);

REGISTER_DOM_CLASS(ce, DOMEntity, dom_node_class_entry, 
php_dom_entity_class_functions, dom_entity_class_entry);

Modified: php/php-src/trunk/ext/dom/php_dom.c
===
--- php/php-src/trunk/ext/dom/php_dom.c 2010-04-09 10:57:47 UTC (rev 297743)
+++ php/php-src/trunk/ext/dom/php_dom.c 2010-04-09 11:34:34 UTC (rev 297744)
@@ -777,15 +777,12 @@
zend_hash_merge(dom_documenttype_prop_handlers, 
dom_node_prop_handlers, NULL, NULL, sizeof(dom_prop_handler), 0);
zend_hash_add(classes, ce.name, ce.name_length + 1, 
dom_documenttype_prop_handlers, sizeof(dom_documenttype_prop_handlers), NULL);

-   REGISTER_DOM_CLASS(ce, DOMNotation, NULL, 
php_dom_notation_class_functions, dom_notation_class_entry);
+   REGISTER_DOM_CLASS(ce, DOMNotation, dom_node_class_entry, 
php_dom_notation_class_functions, dom_notation_class_entry);

zend_hash_init(dom_notation_prop_handlers, 0, NULL, NULL, 1);
dom_register_prop_handler(dom_notation_prop_handlers, publicId, 
dom_notation_public_id_read, NULL TSRMLS_CC);
dom_register_prop_handler(dom_notation_prop_handlers, systemId, 
dom_notation_system_id_read, NULL TSRMLS_CC);
-   /* Notation nodes are special */
-   dom_register_prop_handler(dom_notation_prop_handlers, nodeName, 
dom_node_node_name_read, NULL TSRMLS_CC);
-   dom_register_prop_handler(dom_notation_prop_handlers, nodeValue, 
dom_node_node_value_read, dom_node_node_value_write TSRMLS_CC);
-   dom_register_prop_handler(dom_notation_prop_handlers, attributes, 
dom_node_attributes_read, NULL TSRMLS_CC);
+   zend_hash_merge(dom_notation_prop_handlers, dom_node_prop_handlers, 
NULL, NULL, sizeof(dom_prop_handler), 0);
zend_hash_add(classes, ce.name, ce.name_length + 1, 
dom_notation_prop_handlers, sizeof(dom_notation_prop_handlers), NULL);

REGISTER_DOM_CLASS(ce, DOMEntity, dom_node_class_entry, 
php_dom_entity_class_functions, dom_entity_class_entry);

-- 
PHP CVS Mailing 

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/dom/document.c branches/PHP_5_3/ext/dom/tests/bug35673.phpt trunk/ext/dom/document.c trunk/ext/dom/tests/bug35673.phpt

2010-04-02 Thread Rob Richards
rrichardsFri, 02 Apr 2010 16:15:06 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=297342

Log:
re-apply bug fix #35673 (formatOutput does not work with saveHTML) from old 
trunk
add test
BFN

Bug: http://bugs.php.net/35673 (Closed) formatOutput does not work with saveHTML
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/dom/document.c
A   php/php-src/branches/PHP_5_3/ext/dom/tests/bug35673.phpt
U   php/php-src/trunk/ext/dom/document.c
A   php/php-src/trunk/ext/dom/tests/bug35673.phpt

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2010-04-02 15:46:51 UTC (rev 297341)
+++ php/php-src/branches/PHP_5_3/NEWS   2010-04-02 16:15:06 UTC (rev 297342)
@@ -56,8 +56,8 @@
   (yoa...@gmail.com, Derick)
 - Fixed bug #48902 (Timezone database fallback map is outdated). (Derick)
 - Fixed bug #46111 (Some timezone identifiers can not be parsed). (Derick)
+- Fixed bug #35673 (formatOutput does not work with saveHTML). (Rob)

-
 ?? ??? 20??, PHP 5.3.2
 - Upgraded bundled sqlite to version 3.6.22. (Ilia)
 - Upgraded bundled libmagic to version 5.03. (Mikko)

Modified: php/php-src/branches/PHP_5_3/ext/dom/document.c
===
--- php/php-src/branches/PHP_5_3/ext/dom/document.c 2010-04-02 15:46:51 UTC 
(rev 297341)
+++ php/php-src/branches/PHP_5_3/ext/dom/document.c 2010-04-02 16:15:06 UTC 
(rev 297342)
@@ -2286,7 +2286,8 @@
xmlDoc *docp;
dom_object *intern;
xmlChar *mem;
-   int size;
+   int size, format;
+   dom_doc_propsptr doc_props;

if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), 
O, id, dom_document_class_entry) == FAILURE) {
return;
@@ -2294,7 +2295,13 @@

DOM_GET_OBJ(docp, id, xmlDocPtr, intern);

+#if LIBXML_VERSION = 20623
+   doc_props = dom_get_doc_props(intern-document);
+   format = doc_props-formatoutput;
+   htmlDocDumpMemoryFormat(docp, mem, size, format);
+#else
htmlDocDumpMemory(docp, mem, size);
+#endif
if (!size) {
if (mem)
xmlFree(mem);

Added: php/php-src/branches/PHP_5_3/ext/dom/tests/bug35673.phpt
===
--- php/php-src/branches/PHP_5_3/ext/dom/tests/bug35673.phpt
(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/dom/tests/bug35673.phpt2010-04-02 
16:15:06 UTC (rev 297342)
@@ -0,0 +1,20 @@
+--TEST--
+Bug #35673 (formatOutput does not work with saveHTML).
+--SKIPIF--
+?php require_once('skipif.inc'); ?
+--FILE--
+?php
+$html = 'htmlheadmeta http-equiv=Content-Type content=text/html; 
charset=UTF-8
+titleThis is the title/title/head/html';
+
+$htmldoc = new DOMDocument();
+$htmldoc-loadHTML($html);
+$htmldoc-formatOutput = true;
+echo $htmldoc-saveHTML();
+?
+--EXPECT--
+!DOCTYPE html PUBLIC -//W3C//DTD HTML 4.0 Transitional//EN 
http://www.w3.org/TR/REC-html40/loose.dtd;
+htmlhead
+meta http-equiv=Content-Type content=text/html; charset=UTF-8
+titleThis is the title/title
+/head/html

Modified: php/php-src/trunk/ext/dom/document.c
===
--- php/php-src/trunk/ext/dom/document.c2010-04-02 15:46:51 UTC (rev 
297341)
+++ php/php-src/trunk/ext/dom/document.c2010-04-02 16:15:06 UTC (rev 
297342)
@@ -2286,7 +2286,8 @@
xmlDoc *docp;
dom_object *intern;
xmlChar *mem;
-   int size;
+   int size, format;
+   dom_doc_propsptr doc_props;

if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), 
O, id, dom_document_class_entry) == FAILURE) {
return;
@@ -2294,7 +2295,13 @@

DOM_GET_OBJ(docp, id, xmlDocPtr, intern);

+#if LIBXML_VERSION = 20623
+   doc_props = dom_get_doc_props(intern-document);
+   format = doc_props-formatoutput;
+   htmlDocDumpMemoryFormat(docp, mem, size, format);
+#else
htmlDocDumpMemory(docp, mem, size);
+#endif
if (!size) {
if (mem)
xmlFree(mem);

Added: php/php-src/trunk/ext/dom/tests/bug35673.phpt
===
--- php/php-src/trunk/ext/dom/tests/bug35673.phpt   
(rev 0)
+++ php/php-src/trunk/ext/dom/tests/bug35673.phpt   2010-04-02 16:15:06 UTC 
(rev 297342)
@@ -0,0 +1,20 @@
+--TEST--
+Bug #35673 (formatOutput does not work with saveHTML).
+--SKIPIF--
+?php require_once('skipif.inc'); ?
+--FILE--
+?php
+$html = 'htmlheadmeta http-equiv=Content-Type content=text/html; 
charset=UTF-8
+titleThis is the title/title/head/html';
+
+$htmldoc = new DOMDocument();
+$htmldoc-loadHTML($html);
+$htmldoc-formatOutput = true;
+echo $htmldoc-saveHTML();
+?

[PHP-CVS] svn: /php/php-src/branches/PHP_5_3/ NEWS

2010-04-02 Thread Rob Richards
rrichardsFri, 02 Apr 2010 16:19:23 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=297344

Log:
fix WS

Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2010-04-02 16:15:42 UTC (rev 297343)
+++ php/php-src/branches/PHP_5_3/NEWS   2010-04-02 16:19:23 UTC (rev 297344)
@@ -56,7 +56,7 @@
   (yoa...@gmail.com, Derick)
 - Fixed bug #48902 (Timezone database fallback map is outdated). (Derick)
 - Fixed bug #46111 (Some timezone identifiers can not be parsed). (Derick)
-- Fixed bug #35673 (formatOutput does not work with saveHTML). (Rob)
+- Fixed bug #35673 (formatOutput does not work with saveHTML). (Rob)

 ?? ??? 20??, PHP 5.3.2
 - Upgraded bundled sqlite to version 3.6.22. (Ilia)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/dom/document.c trunk/ext/dom/document.c

2010-04-02 Thread Rob Richards
rrichardsFri, 02 Apr 2010 20:08:15 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=297374

Log:
fix bug #48983 (DomDocument : saveHTMLFile wrong charset)

Bug: http://bugs.php.net/48983 (Open) DomDocument : saveHTMLFile wrong charset 
and crash
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/dom/document.c
U   php/php-src/trunk/ext/dom/document.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2010-04-02 20:05:41 UTC (rev 297373)
+++ php/php-src/branches/PHP_5_3/NEWS   2010-04-02 20:08:15 UTC (rev 297374)
@@ -55,6 +55,7 @@
 - Fixed bug #49192 (PHP crashes when GC invoked on COM object). (Stas)
 - Fixed bug #49059 (DateTime::diff() repeats previous sub() operation).
   (yoa...@gmail.com, Derick)
+- Fixed bug #48983 (DomDocument : saveHTMLFile wrong charset). (Rob)
 - Fixed bug #48902 (Timezone database fallback map is outdated). (Derick)
 - Fixed bug #46111 (Some timezone identifiers can not be parsed). (Derick)
 - Fixed bug #35673 (formatOutput does not work with saveHTML). (Rob)

Modified: php/php-src/branches/PHP_5_3/ext/dom/document.c
===
--- php/php-src/branches/PHP_5_3/ext/dom/document.c 2010-04-02 20:05:41 UTC 
(rev 297373)
+++ php/php-src/branches/PHP_5_3/ext/dom/document.c 2010-04-02 20:08:15 UTC 
(rev 297374)
@@ -2252,6 +2252,7 @@
dom_object *intern;
dom_doc_propsptr doc_props;
char *file;
+   const char *encoding;

if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), 
Os, id, dom_document_class_entry, file, file_len) == FAILURE) {
return;
@@ -2264,11 +2265,12 @@

DOM_GET_OBJ(docp, id, xmlDocPtr, intern);

-   /* encoding handled by property on doc */

+   encoding = (const char *) htmlGetMetaEncoding(docp);
+
doc_props = dom_get_doc_props(intern-document);
format = doc_props-formatoutput;
-   bytes = htmlSaveFileFormat(file, docp, NULL, format);
+   bytes = htmlSaveFileFormat(file, docp, encoding, format);

if (bytes == -1) {
RETURN_FALSE;

Modified: php/php-src/trunk/ext/dom/document.c
===
--- php/php-src/trunk/ext/dom/document.c2010-04-02 20:05:41 UTC (rev 
297373)
+++ php/php-src/trunk/ext/dom/document.c2010-04-02 20:08:15 UTC (rev 
297374)
@@ -2252,6 +2252,7 @@
dom_object *intern;
dom_doc_propsptr doc_props;
char *file;
+   const char *encoding;

if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), 
Os, id, dom_document_class_entry, file, file_len) == FAILURE) {
return;
@@ -2264,11 +2265,12 @@

DOM_GET_OBJ(docp, id, xmlDocPtr, intern);

-   /* encoding handled by property on doc */

+   encoding = (const char *) htmlGetMetaEncoding(docp);
+
doc_props = dom_get_doc_props(intern-document);
format = doc_props-formatoutput;
-   bytes = htmlSaveFileFormat(file, docp, NULL, format);
+   bytes = htmlSaveFileFormat(file, docp, encoding, format);

if (bytes == -1) {
RETURN_FALSE;

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/trunk/ext/hash/ hash.c

2010-03-25 Thread Rob Richards
rrichardsThu, 25 Mar 2010 15:10:49 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=296788

Log:
fix build - there are now 34 algos

Changed paths:
U   php/php-src/trunk/ext/hash/hash.c

Modified: php/php-src/trunk/ext/hash/hash.c
===
--- php/php-src/trunk/ext/hash/hash.c   2010-03-25 14:43:15 UTC (rev 296787)
+++ php/php-src/trunk/ext/hash/hash.c   2010-03-25 15:10:49 UTC (rev 296788)
@@ -43,7 +43,7 @@
int value;
 };

-#define MHASH_NUM_ALGOS 29
+#define MHASH_NUM_ALGOS 34

 static struct mhash_bc_entry mhash_to_hash[MHASH_NUM_ALGOS] = {
{CRC32, crc32, 0},

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/dom/element.c branches/PHP_5_2/ext/dom/tests/bug49463.phpt branches/PHP_5_3/NEWS branches/PHP_5_3/ext/dom/element.c branches/PHP

2010-01-15 Thread Rob Richards
rrichardsFri, 15 Jan 2010 21:29:56 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=293597

Log:
fix bug #49463 (setAttributeNS fails setting default namespace)
add test

Bug: http://bugs.php.net/49463 (Open) 
setAttributeNS(http://www.w3.org/2000/xmlns/,xmlns,blah;) produces error
  
Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS
U   php/php-src/branches/PHP_5_2/ext/dom/element.c
A   php/php-src/branches/PHP_5_2/ext/dom/tests/bug49463.phpt
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/dom/element.c
A   php/php-src/branches/PHP_5_3/ext/dom/tests/bug49463.phpt
U   php/php-src/trunk/ext/dom/element.c
A   php/php-src/trunk/ext/dom/tests/bug49463.phpt

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS	2010-01-15 21:13:25 UTC (rev 293596)
+++ php/php-src/branches/PHP_5_2/NEWS	2010-01-15 21:29:56 UTC (rev 293597)
@@ -36,6 +36,7 @@
 - Fixed bug #50394 (Reference argument converted to value in __call). (Stas)
 - Fixed bug #49851 (http wrapper breaks on 1024 char long headers). (Ilia)
 - Fixed bug #49600 (imageTTFText text shifted right). (Takeshi Abe)
+- Fixed bug #49463 (setAttributeNS fails setting default namespace). (Rob)
 - Fixed bug #48590 (SoapClient does not honor max_redirects). (Sriram)
 - Fixed bug #48190 (Content-type parameter boundary is not case-insensitive
   in HTTP uploads). (Ilia)

Modified: php/php-src/branches/PHP_5_2/ext/dom/element.c
===
--- php/php-src/branches/PHP_5_2/ext/dom/element.c	2010-01-15 21:13:25 UTC (rev 293596)
+++ php/php-src/branches/PHP_5_2/ext/dom/element.c	2010-01-15 21:29:56 UTC (rev 293597)
@@ -792,11 +792,17 @@
 node_list_unlink(nodep-children TSRMLS_CC);
 			}

-			if (xmlStrEqual((xmlChar *) prefix,xmlns)  xmlStrEqual((xmlChar *) uri, DOM_XMLNS_NAMESPACE)) {
+			if ((xmlStrEqual((xmlChar *) prefix, (xmlChar *)xmlns) ||
+(prefix == NULL  xmlStrEqual((xmlChar *) localname, (xmlChar *)xmlns))) 
+xmlStrEqual((xmlChar *) uri, (xmlChar *)DOM_XMLNS_NAMESPACE)) {
 is_xmlns = 1;
-nsptr = dom_get_nsdecl(elemp, localname);
+if (prefix == NULL) {
+	nsptr = dom_get_nsdecl(elemp, NULL);
+} else {
+	nsptr = dom_get_nsdecl(elemp, (xmlChar *)localname);
+}
 			} else {
-nsptr = xmlSearchNsByHref(elemp-doc, elemp, uri);
+nsptr = xmlSearchNsByHref(elemp-doc, elemp, (xmlChar *)uri);
 if (nsptr  nsptr-prefix == NULL) {
 	xmlNsPtr tmpnsptr;

@@ -817,10 +823,15 @@

 			if (nsptr == NULL) {
 if (prefix == NULL) {
-	errorcode = NAMESPACE_ERR;
+	if (is_xmlns == 1) {
+		xmlNewNs(elemp, (xmlChar *)value, NULL);
+		xmlReconciliateNs(elemp-doc, elemp);
+	} else {
+		errorcode = NAMESPACE_ERR;
+	}
 } else {
 	if (is_xmlns == 1) {
-		xmlNewNs(elemp, value, localname);
+		xmlNewNs(elemp, (xmlChar *)value, (xmlChar *)localname);
 	} else {
 		nsptr = dom_get_ns(elemp, uri, errorcode, prefix);
 	}

Added: php/php-src/branches/PHP_5_2/ext/dom/tests/bug49463.phpt
===
--- php/php-src/branches/PHP_5_2/ext/dom/tests/bug49463.phpt	(rev 0)
+++ php/php-src/branches/PHP_5_2/ext/dom/tests/bug49463.phpt	2010-01-15 21:29:56 UTC (rev 293597)
@@ -0,0 +1,17 @@
+--TEST--
+Bug #49463 (setAttributeNS fails setting default namespace).
+--SKIPIF--
+?php require_once('skipif.inc'); ?
+--FILE--
+?php
+
+$doc = new DOMDocument('1.0', 'utf-8');
+$root = $doc-createElementNS('http://purl.org/rss/1.0/','rdf:RDF');
+$doc-appendChild($root);
+$root-setAttributeNS(http://www.w3.org/2000/xmlns/,xmlns,http://purl.org/rss/1.0/; );
+
+echo $doc-saveXML().\n;
+?
+--EXPECT--
+?xml version=1.0 encoding=utf-8?
+rdf:RDF xmlns:rdf=http://purl.org/rss/1.0/; xmlns=http://purl.org/rss/1.0//

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS	2010-01-15 21:13:25 UTC (rev 293596)
+++ php/php-src/branches/PHP_5_3/NEWS	2010-01-15 21:29:56 UTC (rev 293597)
@@ -27,6 +27,7 @@
   variable does not exist). (Ilia)
 - Fixed bug #50576 (XML_OPTION_SKIP_TAGSTART option has no effect). (Pierrick)
 - Fixed bug #49560 (oci8: using LOBs causes slow PHP shutdown). (Oracle Corp.)
+- Fixed bug #49463 (setAttributeNS fails setting default namespace). (Rob)
 - Fixed bug #48590 (SoapClient does not honor max_redirects). (Sriram)
 - Fixed bug #48190 (Content-type parameter boundary is not case-insensitive
   in HTTP uploads). (Ilia)

Modified: php/php-src/branches/PHP_5_3/ext/dom/element.c
===
--- php/php-src/branches/PHP_5_3/ext/dom/element.c	2010-01-15 21:13:25 UTC (rev 293596)
+++ php/php-src/branches/PHP_5_3/ext/dom/element.c	

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/dom/document.c branches/PHP_5_2/ext/dom/tests/bug50661.phpt branches/PHP_5_3/NEWS branches/PHP_5_3/ext/dom/document.c branches/P

2010-01-06 Thread Rob Richards
rrichardsWed, 06 Jan 2010 13:13:17 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=293176

Log:
fix bug #50661 (DOMDocument::loadXML does not allow UTF-16)
add test

Bug: http://bugs.php.net/50661 (Assigned) DOMDocument::loadXML does not allow 
UTF-16
  
Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS
U   php/php-src/branches/PHP_5_2/ext/dom/document.c
A   php/php-src/branches/PHP_5_2/ext/dom/tests/bug50661.phpt
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/dom/document.c
A   php/php-src/branches/PHP_5_3/ext/dom/tests/bug50661.phpt
U   php/php-src/trunk/ext/dom/document.c
A   php/php-src/trunk/ext/dom/tests/bug50661.phpt

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS   2010-01-06 12:54:53 UTC (rev 293175)
+++ php/php-src/branches/PHP_5_2/NEWS   2010-01-06 13:13:17 UTC (rev 293176)
@@ -11,6 +11,7 @@

 - Fixed build of mysqli with MySQL 5.5.0-m2. (Andrey)

+- Fixed bug #50661 (DOMDocument::loadXML does not allow UTF-16). (Rob)
 - Fixed bug #50657 (copy() with an empty (zero-byte) HTTP source succeeds but
   returns false). (Ilia)
 - Fixed bug #50636 (MySQLi_Result sets values before calling constructor).

Modified: php/php-src/branches/PHP_5_2/ext/dom/document.c
===
--- php/php-src/branches/PHP_5_2/ext/dom/document.c 2010-01-06 12:54:53 UTC 
(rev 293175)
+++ php/php-src/branches/PHP_5_2/ext/dom/document.c 2010-01-06 13:13:17 UTC 
(rev 293176)
@@ -1598,7 +1598,7 @@


 /* {{{ */
-static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, int 
options TSRMLS_DC) {
+static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, int 
source_len, int options TSRMLS_DC) {
 xmlDocPtr ret;
 xmlParserCtxtPtr ctxt = NULL;
dom_doc_propsptr doc_props;
@@ -1634,7 +1634,7 @@
}

} else {
-   ctxt = xmlCreateDocParserCtxt(source);
+   ctxt = xmlCreateMemoryParserCtxt(source, source_len);
}

if (ctxt == NULL) {
@@ -1737,7 +1737,7 @@
RETURN_FALSE;
}

-   newdoc = dom_document_parser(id, mode, source, options TSRMLS_CC);
+   newdoc = dom_document_parser(id, mode, source, source_len, options 
TSRMLS_CC);

if (!newdoc)
RETURN_FALSE;

Added: php/php-src/branches/PHP_5_2/ext/dom/tests/bug50661.phpt
===
--- php/php-src/branches/PHP_5_2/ext/dom/tests/bug50661.phpt
(rev 0)
+++ php/php-src/branches/PHP_5_2/ext/dom/tests/bug50661.phpt2010-01-06 
13:13:17 UTC (rev 293176)
@@ -0,0 +1,16 @@
+--TEST--
+Bug #50661 (DOMDocument::loadXML does not allow UTF-16).
+--SKIPIF--
+?php require_once('skipif.inc'); ?
+--FILE--
+?php
+$data = \xFE\xFF\x00\x3C\x00\x66\x00\x6F\x00\x6F\x00\x2F\x00\x3E;
+
+$dom = new DOMDocument();
+$dom-loadXML($data);
+echo $dom-saveXML();
+
+?
+--EXPECT--
+?xml version=1.0?
+foo/

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2010-01-06 12:54:53 UTC (rev 293175)
+++ php/php-src/branches/PHP_5_3/NEWS   2010-01-06 13:13:17 UTC (rev 293176)
@@ -8,6 +8,7 @@
   (Ilia)
 - Added stream_resolve_include_path(). (Mikko)

+- Fixed bug #50661 (DOMDocument::loadXML does not allow UTF-16). (Rob)
 - Fixed bug #50657 (copy() with an empty (zero-byte) HTTP source succeeds
   but returns false). (Ilia)
 - Fixed bug #50636 (MySQLi_Result sets values before calling constructor).

Modified: php/php-src/branches/PHP_5_3/ext/dom/document.c
===
--- php/php-src/branches/PHP_5_3/ext/dom/document.c 2010-01-06 12:54:53 UTC 
(rev 293175)
+++ php/php-src/branches/PHP_5_3/ext/dom/document.c 2010-01-06 13:13:17 UTC 
(rev 293176)
@@ -1542,7 +1542,7 @@
 }
 /* }}} */

-static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, int 
options TSRMLS_DC) /* {{{ */
+static xmlDocPtr dom_document_parser(zval *id, int mode, char *source, int 
source_len, int options TSRMLS_DC) /* {{{ */
 {
 xmlDocPtr ret;
 xmlParserCtxtPtr ctxt = NULL;
@@ -1579,7 +1579,7 @@
}

} else {
-   ctxt = xmlCreateDocParserCtxt(source);
+   ctxt = xmlCreateMemoryParserCtxt(source, source_len);
}

if (ctxt == NULL) {
@@ -1682,7 +1682,7 @@
RETURN_FALSE;
}

-   newdoc = dom_document_parser(id, mode, source, options TSRMLS_CC);
+   newdoc = dom_document_parser(id, mode, source, source_len, options 
TSRMLS_CC);

if (!newdoc)
RETURN_FALSE;

Added: php/php-src/branches/PHP_5_3/ext/dom/tests/bug50661.phpt

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/NEWS branches/PHP_5_2/ext/dom/document.c branches/PHP_5_2/ext/dom/tests/bug47848.phpt branches/PHP_5_3/ext/dom/document.c branches/PHP_5_3/ext/dom/tests/b

2009-12-03 Thread Rob Richards
rrichardsThu, 03 Dec 2009 20:19:38 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=291669

Log:
fix bug #47848 (importNode doesn't preserve attribute namespaces)
add tests

Bug: http://bugs.php.net/47848 (Open) importNode doesn't preserve attribute 
namespaces
  
Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS
U   php/php-src/branches/PHP_5_2/ext/dom/document.c
A   php/php-src/branches/PHP_5_2/ext/dom/tests/bug47848.phpt
U   php/php-src/branches/PHP_5_3/ext/dom/document.c
A   php/php-src/branches/PHP_5_3/ext/dom/tests/bug47848.phpt
U   php/php-src/trunk/ext/dom/document.c
A   php/php-src/trunk/ext/dom/tests/bug47848.phpt

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS   2009-12-03 19:53:13 UTC (rev 291668)
+++ php/php-src/branches/PHP_5_2/NEWS   2009-12-03 20:19:38 UTC (rev 291669)
@@ -14,6 +14,7 @@
 - Fixed bug #49660 (libxml 2.7.3+ limits text nodes to 10MB). (Felipe)
 - Fixed bug #49472 (Constants defined in Interfaces can be overridden).
   (Felipe)
+- Fixed bug #47848 (importNode doesn't preserve attribute namespaces). (Rob)
 - Fixed bug #45120 (PDOStatement-execute() returns true then false for same
   statement). (Pierrick)


Modified: php/php-src/branches/PHP_5_2/ext/dom/document.c
===
--- php/php-src/branches/PHP_5_2/ext/dom/document.c 2009-12-03 19:53:13 UTC 
(rev 291668)
+++ php/php-src/branches/PHP_5_2/ext/dom/document.c 2009-12-03 20:19:38 UTC 
(rev 291669)
@@ -1252,6 +1252,18 @@
if (!retnodep) {
RETURN_FALSE;
}
+
+   if ((retnodep-type == XML_ATTRIBUTE_NODE)  (nodep-ns != 
NULL)) {
+   xmlNsPtr nsptr = NULL;
+   xmlNodePtr root = xmlDocGetRootElement(docp);
+
+   nsptr = xmlSearchNsByHref (nodep-doc, root, 
nodep-ns-href);
+   if (nsptr == NULL) {
+   int errorcode;
+   nsptr = dom_get_ns(root, nodep-ns-href, 
errorcode, nodep-ns-prefix);
+   }
+   xmlSetNs(retnodep, nsptr);
+   }

}


Added: php/php-src/branches/PHP_5_2/ext/dom/tests/bug47848.phpt
===
--- php/php-src/branches/PHP_5_2/ext/dom/tests/bug47848.phpt
(rev 0)
+++ php/php-src/branches/PHP_5_2/ext/dom/tests/bug47848.phpt2009-12-03 
20:19:38 UTC (rev 291669)
@@ -0,0 +1,25 @@
+--TEST--
+Bug #47848 (importNode doesn't preserve attribute namespaces)
+--SKIPIF--
+?php require_once('skipif.inc'); ?
+--FILE--
+?php
+
+$aDOM = new DOMDocument();
+$aDOM-appendChild($aDOM-createElementNS('http://friend2friend.net/','f2f:a'));
+
+$fromdom = new DOMDocument();
+$fromdom-loadXML('data xmlns:ai=http://altruists.org; ai:attr=namespaced 
/');
+
+$attr= $fromdom-firstChild-attributes-item(0);
+
+$att = $aDOM-importNode($attr);
+
+$aDOM-documentElement-appendChild($aDOM-importNode($attr, true));
+
+echo $aDOM-saveXML();
+
+?
+--EXPECT--
+?xml version=1.0?
+f2f:a xmlns:f2f=http://friend2friend.net/; xmlns:ai=http://altruists.org; 
ai:attr=namespaced/
\ No newline at end of file

Modified: php/php-src/branches/PHP_5_3/ext/dom/document.c
===
--- php/php-src/branches/PHP_5_3/ext/dom/document.c 2009-12-03 19:53:13 UTC 
(rev 291668)
+++ php/php-src/branches/PHP_5_3/ext/dom/document.c 2009-12-03 20:19:38 UTC 
(rev 291669)
@@ -1203,7 +1203,18 @@
if (!retnodep) {
RETURN_FALSE;
}
-
+
+   if ((retnodep-type == XML_ATTRIBUTE_NODE)  (nodep-ns != 
NULL)) {
+   xmlNsPtr nsptr = NULL;
+   xmlNodePtr root = xmlDocGetRootElement(docp);
+
+   nsptr = xmlSearchNsByHref (nodep-doc, root, 
nodep-ns-href);
+   if (nsptr == NULL) {
+   int errorcode;
+   nsptr = dom_get_ns(root, nodep-ns-href, 
errorcode, nodep-ns-prefix);
+   }
+   xmlSetNs(retnodep, nsptr);
+   }
}

DOM_RET_OBJ(rv, (xmlNodePtr) retnodep, ret, intern);

Added: php/php-src/branches/PHP_5_3/ext/dom/tests/bug47848.phpt
===
--- php/php-src/branches/PHP_5_3/ext/dom/tests/bug47848.phpt
(rev 0)
+++ php/php-src/branches/PHP_5_3/ext/dom/tests/bug47848.phpt2009-12-03 
20:19:38 UTC (rev 291669)
@@ -0,0 +1,25 @@
+--TEST--
+Bug #47848 (importNode doesn't preserve attribute namespaces)
+--SKIPIF--
+?php require_once('skipif.inc'); ?
+--FILE--
+?php
+
+$aDOM = new DOMDocument();

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_2/ext/dom/documenttype.c branches/PHP_5_3/ext/dom/documenttype.c trunk/ext/dom/documenttype.c

2009-09-24 Thread Rob Richards
rrichardsThu, 24 Sep 2009 12:40:59 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=288652

Log:
fix memleak

Changed paths:
U   php/php-src/branches/PHP_5_2/ext/dom/documenttype.c
U   php/php-src/branches/PHP_5_3/ext/dom/documenttype.c
U   php/php-src/trunk/ext/dom/documenttype.c

Modified: php/php-src/branches/PHP_5_2/ext/dom/documenttype.c
===
--- php/php-src/branches/PHP_5_2/ext/dom/documenttype.c 2009-09-24 11:04:52 UTC 
(rev 288651)
+++ php/php-src/branches/PHP_5_2/ext/dom/documenttype.c 2009-09-24 12:40:59 UTC 
(rev 288652)
@@ -200,7 +200,6 @@
xmlDtdPtr dtdptr;
xmlDtd *intsubset;
xmlOutputBuffer *buff = NULL;
-   xmlChar *strintsubset;

dtdptr = (xmlDtdPtr) dom_object_get_node(obj);

@@ -216,9 +215,8 @@
if (buff != NULL) {
xmlNodeDumpOutput (buff, NULL, (xmlNodePtr) intsubset, 
0, 0, NULL);
xmlOutputBufferFlush(buff);
-   strintsubset = xmlStrndup(buff-buffer-content, 
buff-buffer-use);
+   ZVAL_STRINGL(*retval, buff-buffer-content, 
buff-buffer-use, 1);
(void)xmlOutputBufferClose(buff);
-   ZVAL_STRING(*retval, (char *) strintsubset, 1);
return SUCCESS;
}
}

Modified: php/php-src/branches/PHP_5_3/ext/dom/documenttype.c
===
--- php/php-src/branches/PHP_5_3/ext/dom/documenttype.c 2009-09-24 11:04:52 UTC 
(rev 288651)
+++ php/php-src/branches/PHP_5_3/ext/dom/documenttype.c 2009-09-24 12:40:59 UTC 
(rev 288652)
@@ -190,7 +190,6 @@
xmlDtdPtr dtdptr;
xmlDtd *intsubset;
xmlOutputBuffer *buff = NULL;
-   xmlChar *strintsubset;

dtdptr = (xmlDtdPtr) dom_object_get_node(obj);

@@ -206,9 +205,8 @@
if (buff != NULL) {
xmlNodeDumpOutput (buff, NULL, (xmlNodePtr) intsubset, 
0, 0, NULL);
xmlOutputBufferFlush(buff);
-   strintsubset = xmlStrndup(buff-buffer-content, 
buff-buffer-use);
+   ZVAL_STRINGL(*retval, buff-buffer-content, 
buff-buffer-use, 1);
(void)xmlOutputBufferClose(buff);
-   ZVAL_STRING(*retval, (char *) strintsubset, 1);
return SUCCESS;
}
}

Modified: php/php-src/trunk/ext/dom/documenttype.c
===
--- php/php-src/trunk/ext/dom/documenttype.c2009-09-24 11:04:52 UTC (rev 
288651)
+++ php/php-src/trunk/ext/dom/documenttype.c2009-09-24 12:40:59 UTC (rev 
288652)
@@ -190,7 +190,6 @@
xmlDtdPtr dtdptr;
xmlDtd *intsubset;
xmlOutputBuffer *buff = NULL;
-   xmlChar *strintsubset;

dtdptr = (xmlDtdPtr) dom_object_get_node(obj);

@@ -206,9 +205,8 @@
if (buff != NULL) {
xmlNodeDumpOutput (buff, NULL, (xmlNodePtr) intsubset, 
0, 0, NULL);
xmlOutputBufferFlush(buff);
-   strintsubset = xmlStrndup(buff-buffer-content, 
buff-buffer-use);
+   ZVAL_STRINGL(*retval, buff-buffer-content, 
buff-buffer-use, 1);
(void)xmlOutputBufferClose(buff);
-   ZVAL_STRING(*retval, (char *) strintsubset, 1);
return SUCCESS;
}
}

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/ branches/PHP_5_3/NEWS branches/PHP_5_3/ext/dom/node.c trunk/ext/dom/node.c

2009-09-24 Thread Rob Richards
rrichardsThu, 24 Sep 2009 13:18:22 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=288654

Log:
Fixed bug #49647 (DOMUserData does not exist)

Bug: http://bugs.php.net/49647 (Open) DOMUserData does not exist
  
Changed paths:
U   php/php-src/branches/PHP_5_3/NEWS
U   php/php-src/branches/PHP_5_3/ext/dom/node.c
U   php/php-src/trunk/ext/dom/node.c

Modified: php/php-src/branches/PHP_5_3/NEWS
===
--- php/php-src/branches/PHP_5_3/NEWS   2009-09-24 12:51:03 UTC (rev 288653)
+++ php/php-src/branches/PHP_5_3/NEWS   2009-09-24 13:18:22 UTC (rev 288654)
@@ -6,6 +6,7 @@
 - Implemented FR #49253 (added support for libcurl's CERTINFO option).
   (Linus Nielsen Feltzing li...@haxx.se)

+- Fixed bug #49647 (DOMUserData does not exist). (Rob)
 - Fixed bug #49630 (imap_listscan function missing). (Felipe)
 - Fixed bug #49531 (CURLOPT_INFILESIZE sometimes causes warning CURLPROTO_FILE
   cannot be set). (Felipe)

Modified: php/php-src/branches/PHP_5_3/ext/dom/node.c
===
--- php/php-src/branches/PHP_5_3/ext/dom/node.c 2009-09-24 12:51:03 UTC (rev 
288653)
+++ php/php-src/branches/PHP_5_3/ext/dom/node.c 2009-09-24 13:18:22 UTC (rev 
288654)
@@ -1730,7 +1730,7 @@
 }
 /* }}} end dom_node_get_feature */

-/* {{{ proto DomUserData dom_node_set_user_data(string key, DomUserData data, 
userdatahandler handler);
+/* {{{ proto mixed dom_node_set_user_data(string key, mixed data, 
userdatahandler handler);
 URL: 
http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-setUserData
 Since: DOM Level 3
 */
@@ -1740,7 +1740,7 @@
 }
 /* }}} end dom_node_set_user_data */

-/* {{{ proto DomUserData dom_node_get_user_data(string key);
+/* {{{ proto mixed dom_node_get_user_data(string key);
 URL: 
http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-getUserData
 Since: DOM Level 3
 */

Modified: php/php-src/trunk/ext/dom/node.c
===
--- php/php-src/trunk/ext/dom/node.c2009-09-24 12:51:03 UTC (rev 288653)
+++ php/php-src/trunk/ext/dom/node.c2009-09-24 13:18:22 UTC (rev 288654)
@@ -1732,7 +1732,7 @@
 }
 /* }}} end dom_node_get_feature */

-/* {{{ proto DomUserData dom_node_set_user_data(string key, DomUserData data, 
userdatahandler handler) U
+/* {{{ proto mixed dom_node_set_user_data(string key, mixed data, 
userdatahandler handler) U
 URL: 
http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-setUserData
 Since: DOM Level 3
 */
@@ -1742,7 +1742,7 @@
 }
 /* }}} end dom_node_set_user_data */

-/* {{{ proto DomUserData dom_node_get_user_data(string key) U
+/* {{{ proto mixed dom_node_get_user_data(string key) U
 URL: 
http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-getUserData
 Since: DOM Level 3
 */

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] svn: /php/php-src/branches/PHP_5_2/ NEWS ext/dom/node.c

2009-09-24 Thread Rob Richards
rrichardsThu, 24 Sep 2009 15:10:21 +

Revision: http://svn.php.net/viewvc?view=revisionrevision=288658

Log:
MFH: Fixed bug #49647 (DOMUserData does not exist)

Bug: http://bugs.php.net/49647 (Closed) DOMUserData does not exist
  
Changed paths:
U   php/php-src/branches/PHP_5_2/NEWS
U   php/php-src/branches/PHP_5_2/ext/dom/node.c

Modified: php/php-src/branches/PHP_5_2/NEWS
===
--- php/php-src/branches/PHP_5_2/NEWS   2009-09-24 14:56:28 UTC (rev 288657)
+++ php/php-src/branches/PHP_5_2/NEWS   2009-09-24 15:10:21 UTC (rev 288658)
@@ -1,6 +1,7 @@
 PHPNEWS
 |||
 ?? ??? , PHP 5.2.12
+- Fixed bug #49647 (DOMUserData does not exist). (Rob)
 - Fixed bug #49630 (imap_listscan function missing). (Felipe)
 - Fixed bug #49578 (make install-pear fails). (Hannes)
 - Fixed bug #49536 (mb_detect_encoding() returns incorrect results when

Modified: php/php-src/branches/PHP_5_2/ext/dom/node.c
===
--- php/php-src/branches/PHP_5_2/ext/dom/node.c 2009-09-24 14:56:28 UTC (rev 
288657)
+++ php/php-src/branches/PHP_5_2/ext/dom/node.c 2009-09-24 15:10:21 UTC (rev 
288658)
@@ -1778,7 +1778,7 @@
 /* }}} end dom_node_get_feature */


-/* {{{ proto DomUserData dom_node_set_user_data(string key, DomUserData data, 
userdatahandler handler);
+/* {{{ proto mixed dom_node_set_user_data(string key, mixed data, 
userdatahandler handler);
 URL: 
http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-setUserData
 Since: DOM Level 3
 */
@@ -1789,7 +1789,7 @@
 /* }}} end dom_node_set_user_data */


-/* {{{ proto DomUserData dom_node_get_user_data(string key);
+/* {{{ proto mixed dom_node_get_user_data(string key);
 URL: 
http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-getUserData
 Since: DOM Level 3
 */

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/libxml libxml.c

2009-06-26 Thread Rob Richards
rrichards   Fri Jun 26 20:27:44 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/libxml libxml.c 
  Log:
  MFH: add libxml_disable_entity_loader function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/libxml/libxml.c?r1=1.32.2.7.2.19r2=1.32.2.7.2.20diff_format=u
Index: php-src/ext/libxml/libxml.c
diff -u php-src/ext/libxml/libxml.c:1.32.2.7.2.19 
php-src/ext/libxml/libxml.c:1.32.2.7.2.20
--- php-src/ext/libxml/libxml.c:1.32.2.7.2.19   Tue Jun 23 12:38:32 2009
+++ php-src/ext/libxml/libxml.c Fri Jun 26 20:27:44 2009
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: libxml.c,v 1.32.2.7.2.19 2009/06/23 12:38:32 bjori Exp $ */
+/* $Id: libxml.c,v 1.32.2.7.2.20 2009/06/26 20:27:44 rrichards Exp $ */
 
 #define IS_EXT_MODULE
 
@@ -68,6 +68,7 @@
 static PHP_FUNCTION(libxml_get_last_error);
 static PHP_FUNCTION(libxml_clear_errors);
 static PHP_FUNCTION(libxml_get_errors);
+static PHP_FUNCTION(libxml_disable_entity_loader);
 
 static zend_class_entry *libxmlerror_class_entry;
 
@@ -109,6 +110,11 @@
 ZEND_BEGIN_ARG_INFO(arginfo_libxml_clear_errors, 0)
 ZEND_END_ARG_INFO()
 
+static
+ZEND_BEGIN_ARG_INFO_EX(arginfo_libxml_disable_entity_loader, 0, 0, 0)
+   ZEND_ARG_INFO(0, disable)
+ZEND_END_ARG_INFO()
+
 /* }}} */
 
 /* {{{ extension definition structures */
@@ -118,6 +124,7 @@
PHP_FE(libxml_get_last_error, arginfo_libxml_get_last_error)
PHP_FE(libxml_clear_errors, arginfo_libxml_clear_errors)
PHP_FE(libxml_get_errors, arginfo_libxml_get_errors)
+   PHP_FE(libxml_disable_entity_loader, 
arginfo_libxml_disable_entity_loader)
{NULL, NULL, NULL}
 };
 
@@ -349,6 +356,12 @@
 }
 
 static xmlParserInputBufferPtr
+php_libxml_input_buffer_noload(const char *URI, xmlCharEncoding enc)
+{
+   return NULL;
+}
+
+static xmlParserInputBufferPtr
 php_libxml_input_buffer_create_filename(const char *URI, xmlCharEncoding enc)
 {
xmlParserInputBufferPtr ret;
@@ -823,6 +836,31 @@
 }
 /* }}} */
 
+/* {{{ proto bool libxml_disable_entity_loader([boolean disable]) 
+   Disable/Enable ability to load external entities */
+static PHP_FUNCTION(libxml_disable_entity_loader)
+{
+   zend_bool disable = 1;
+   xmlParserInputBufferCreateFilenameFunc old;
+
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |b, disable) == 
FAILURE) {
+   return;
+   }
+
+   if (disable == 0) {
+   old = 
xmlParserInputBufferCreateFilenameDefault(php_libxml_input_buffer_create_filename);
+   } else {
+   old = 
xmlParserInputBufferCreateFilenameDefault(php_libxml_input_buffer_noload);
+   }
+
+   if (old == php_libxml_input_buffer_noload) {
+   RETURN_TRUE;
+   }
+
+   RETURN_FALSE;
+}
+/* }}} */
+
 /* {{{ Common functions shared by extensions */
 int php_libxml_xmlCheckUTF8(const unsigned char *s)
 {



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/libxml libxml.c

2009-06-23 Thread Rob Richards
rrichards   Tue Jun 23 10:49:01 2009 UTC

  Modified files:  
/php-src/ext/libxml libxml.c 
  Log:
  add libxml_disable_entity_loader function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/libxml/libxml.c?r1=1.77r2=1.78diff_format=u
Index: php-src/ext/libxml/libxml.c
diff -u php-src/ext/libxml/libxml.c:1.77 php-src/ext/libxml/libxml.c:1.78
--- php-src/ext/libxml/libxml.c:1.77Thu Mar 26 22:16:48 2009
+++ php-src/ext/libxml/libxml.c Tue Jun 23 10:49:00 2009
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: libxml.c,v 1.77 2009/03/26 22:16:48 felipe Exp $ */
+/* $Id: libxml.c,v 1.78 2009/06/23 10:49:00 rrichards Exp $ */
 
 #define IS_EXT_MODULE
 
@@ -68,6 +68,7 @@
 static PHP_FUNCTION(libxml_get_last_error);
 static PHP_FUNCTION(libxml_clear_errors);
 static PHP_FUNCTION(libxml_get_errors);
+static PHP_FUNCTION(libxml_disable_entity_loader);
 
 static zend_class_entry *libxmlerror_class_entry;
 
@@ -104,6 +105,10 @@
 ZEND_BEGIN_ARG_INFO(arginfo_libxml_clear_errors, 0)
 ZEND_END_ARG_INFO()
 
+ZEND_BEGIN_ARG_INFO(arginfo_libxml_disable_entity_loader, 0)
+   ZEND_ARG_INFO(0, disable)
+ZEND_END_ARG_INFO()
+
 /* }}} */
 
 /* {{{ extension definition structures */
@@ -113,6 +118,7 @@
PHP_FE(libxml_get_last_error, arginfo_libxml_get_last_error)
PHP_FE(libxml_clear_errors, arginfo_libxml_clear_errors)
PHP_FE(libxml_get_errors, arginfo_libxml_get_errors)
+   PHP_FE(libxml_disable_entity_loader, 
arginfo_libxml_disable_entity_loader)
{NULL, NULL, NULL}
 };
 
@@ -344,6 +350,12 @@
 }
 
 static xmlParserInputBufferPtr
+php_libxml_input_buffer_noload(const char *URI, xmlCharEncoding enc)
+{
+   return NULL;
+}
+
+static xmlParserInputBufferPtr
 php_libxml_input_buffer_create_filename(const char *URI, xmlCharEncoding enc)
 {
xmlParserInputBufferPtr ret;
@@ -820,6 +832,31 @@
 }
 /* }}} */
 
+/* {{{ proto bool libxml_disable_entity_loader([boolean disable]) 
+   Disable/Enable ability to load external entities */
+static PHP_FUNCTION(libxml_disable_entity_loader)
+{
+   zend_bool disable = 1;
+   xmlParserInputBufferCreateFilenameFunc old;
+
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |b, disable) == 
FAILURE) {
+   return;
+   }
+
+   if (disable == 0) {
+   old = 
xmlParserInputBufferCreateFilenameDefault(php_libxml_input_buffer_create_filename);
+   } else {
+   old = 
xmlParserInputBufferCreateFilenameDefault(php_libxml_input_buffer_noload);
+   }
+
+   if (old == php_libxml_input_buffer_noload) {
+   RETURN_TRUE;
+   }
+
+   RETURN_FALSE;
+}
+/* }}} */
+
 /* {{{ Common functions shared by extensions */
 int php_libxml_xmlCheckUTF8(const unsigned char *s)
 {



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/libxml libxml.c

2009-06-23 Thread Rob Richards
rrichards   Tue Jun 23 10:50:09 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/libxml libxml.c 
  Log:
  MFH: add libxml_disable_entity_loader function
  
http://cvs.php.net/viewvc.cgi/php-src/ext/libxml/libxml.c?r1=1.32.2.7.2.15.2.11r2=1.32.2.7.2.15.2.12diff_format=u
Index: php-src/ext/libxml/libxml.c
diff -u php-src/ext/libxml/libxml.c:1.32.2.7.2.15.2.11 
php-src/ext/libxml/libxml.c:1.32.2.7.2.15.2.12
--- php-src/ext/libxml/libxml.c:1.32.2.7.2.15.2.11  Sat Mar 14 17:30:28 2009
+++ php-src/ext/libxml/libxml.c Tue Jun 23 10:50:09 2009
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: libxml.c,v 1.32.2.7.2.15.2.11 2009/03/14 17:30:28 rrichards Exp $ */
+/* $Id: libxml.c,v 1.32.2.7.2.15.2.12 2009/06/23 10:50:09 rrichards Exp $ */
 
 #define IS_EXT_MODULE
 
@@ -68,6 +68,7 @@
 static PHP_FUNCTION(libxml_get_last_error);
 static PHP_FUNCTION(libxml_clear_errors);
 static PHP_FUNCTION(libxml_get_errors);
+static PHP_FUNCTION(libxml_disable_entity_loader);
 
 static zend_class_entry *libxmlerror_class_entry;
 
@@ -104,6 +105,10 @@
 ZEND_BEGIN_ARG_INFO(arginfo_libxml_clear_errors, 0)
 ZEND_END_ARG_INFO()
 
+ZEND_BEGIN_ARG_INFO(arginfo_libxml_disable_entity_loader, 0)
+   ZEND_ARG_INFO(0, disable)
+ZEND_END_ARG_INFO()
+
 /* }}} */
 
 /* {{{ extension definition structures */
@@ -113,6 +118,7 @@
PHP_FE(libxml_get_last_error, arginfo_libxml_get_last_error)
PHP_FE(libxml_clear_errors, arginfo_libxml_clear_errors)
PHP_FE(libxml_get_errors, arginfo_libxml_get_errors)
+   PHP_FE(libxml_disable_entity_loader, 
arginfo_libxml_disable_entity_loader)
{NULL, NULL, NULL}
 };
 
@@ -344,6 +350,12 @@
 }
 
 static xmlParserInputBufferPtr
+php_libxml_input_buffer_noload(const char *URI, xmlCharEncoding enc)
+{
+   return NULL;
+}
+
+static xmlParserInputBufferPtr
 php_libxml_input_buffer_create_filename(const char *URI, xmlCharEncoding enc)
 {
xmlParserInputBufferPtr ret;
@@ -820,6 +832,31 @@
 }
 /* }}} */
 
+/* {{{ proto bool libxml_disable_entity_loader([boolean disable]) 
+   Disable/Enable ability to load external entities */
+static PHP_FUNCTION(libxml_disable_entity_loader)
+{
+   zend_bool disable = 1;
+   xmlParserInputBufferCreateFilenameFunc old;
+
+   if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, |b, disable) == 
FAILURE) {
+   return;
+   }
+
+   if (disable == 0) {
+   old = 
xmlParserInputBufferCreateFilenameDefault(php_libxml_input_buffer_create_filename);
+   } else {
+   old = 
xmlParserInputBufferCreateFilenameDefault(php_libxml_input_buffer_noload);
+   }
+
+   if (old == php_libxml_input_buffer_noload) {
+   RETURN_TRUE;
+   }
+
+   RETURN_FALSE;
+}
+/* }}} */
+
 /* {{{ Common functions shared by extensions */
 int php_libxml_xmlCheckUTF8(const unsigned char *s)
 {



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_3) / NEWS /ext/standard filters.c http_fopen_wrapper.c /ext/standard/tests/filters chunked_001.phpt

2009-04-16 Thread Rob Richards

Hannes Magnusson wrote:

On Thu, Apr 16, 2009 at 12:16, Dmitry Stogov dmi...@php.net wrote:
  

dmitry  Thu Apr 16 10:16:27 2009 UTC

 Added files: (Branch: PHP_5_3)
   /php-src/ext/standard/tests/filters chunked_001.phpt

 Modified files:
   /php-srcNEWS
   /php-src/ext/standard   filters.c http_fopen_wrapper.c
 Log:
 - Added dechunk filter which can decode HTTP responces with chunked transfer-encoding. HTTP streams use this 
filter automatically in case Transfer-Encoding: chunked header presents in responce. It's possible to disable 
this behaviour using http=array(auto_decode=0) in stream context
 - Fixed bug #47021 (SoapClient stumbles over WSDL delivered with 
Transfer-Encoding: chunked)



Although its great that this is implemented as a filter I'm a bit
sceptical on removing the header from the response, and enabling this
by default is quite a big change considering PHP has never supported
chunked encoding and bunch of userland implementations exist for it.

-Hannes

  
The header needs to be taken out so the caller knows that the content is 
no longer chunked. It would however be nice if some header was added 
indicating that the data had been chunked. Similar to how ext/http does 
it where it changes the Transfer-Encoding header to 
X-Original-Transfer-Encoding.


Rob


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/dom document.c /ext/dom/tests bug47849.phpt

2009-04-07 Thread Rob Richards
rrichards   Tue Apr  7 15:33:20 2009 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/dom/tests  bug47849.phpt 

  Modified files:  
/php-src/ext/domdocument.c 
  Log:
  MFH: fix bug #47849 (Non-deep import loses the namespace)
  add test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/document.c?r1=1.68.2.3.2.12r2=1.68.2.3.2.13diff_format=u
Index: php-src/ext/dom/document.c
diff -u php-src/ext/dom/document.c:1.68.2.3.2.12 
php-src/ext/dom/document.c:1.68.2.3.2.13
--- php-src/ext/dom/document.c:1.68.2.3.2.12Fri Mar 13 13:41:42 2009
+++ php-src/ext/dom/document.c  Tue Apr  7 15:33:20 2009
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: document.c,v 1.68.2.3.2.12 2009/03/13 13:41:42 rrichards Exp $ */
+/* $Id: document.c,v 1.68.2.3.2.13 2009/04/07 15:33:20 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -1245,6 +1245,9 @@
if (nodep-doc == docp) {
retnodep = nodep;
} else {
+   if ((recursive == 0)  (nodep-type == XML_ELEMENT_NODE)) {
+   recursive = 2;
+   }
retnodep = xmlDocCopyNode(nodep, docp, recursive);
if (!retnodep) {
RETURN_FALSE;

http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/bug47849.phpt?view=markuprev=1.1
Index: php-src/ext/dom/tests/bug47849.phpt
+++ php-src/ext/dom/tests/bug47849.phpt
--TEST--
Bug #47849 (Non-deep import loses the namespace).
--SKIPIF--
?php require_once('skipif.inc'); ?
--FILE--
?php 

$aDOM= new DOMDocument();
$aDOM-appendChild($aDOM-createElementNS('urn::root','r:root'));

$fromdom= new DOMDocument();
$fromdom-loadXML('data xmlns=urn::dat/data');

$data= $fromdom-documentElement;
$aDOM-documentElement-appendChild($aDOM-importNode($data));

echo $aDOM-saveXML();

?
--EXPECT--
?xml version=1.0?
r:root xmlns:r=urn::rootdata xmlns=urn::data//r:root



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS

2009-04-07 Thread Rob Richards
rrichards   Tue Apr  7 15:34:38 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  BFN
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1462r2=1.2027.2.547.2.1463diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1462 php-src/NEWS:1.2027.2.547.2.1463
--- php-src/NEWS:1.2027.2.547.2.1462Tue Apr  7 14:08:39 2009
+++ php-src/NEWSTue Apr  7 15:34:37 2009
@@ -11,6 +11,7 @@
 - Fixed segfault on invalid session.save_path. (Hannes)
 
 - Fixed bug #47903 (@ operator does not work with string offsets). (Felipe)
+- Fixed bug #47849 (Non-deep import loses the namespace). (Rob)
 - Fixed bug #47845 (PDO_Firebird omits first row from query). (Lars W)
 - Fixed bug #47831 (Compile warning for strnlen() in main/spprintf.c).
   (Ilia, rainer dot jung at kippdata dot de)



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/libxml libxml.c

2009-03-14 Thread Rob Richards
rrichards   Sat Mar 14 17:30:28 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/libxml libxml.c 
  Log:
  MFH: add LIBXML_LOADED_VERSION constant that contains currently loaded 
libxml2 version
  add libxml2 version being used to info output
  
http://cvs.php.net/viewvc.cgi/php-src/ext/libxml/libxml.c?r1=1.32.2.7.2.15.2.10r2=1.32.2.7.2.15.2.11diff_format=u
Index: php-src/ext/libxml/libxml.c
diff -u php-src/ext/libxml/libxml.c:1.32.2.7.2.15.2.10 
php-src/ext/libxml/libxml.c:1.32.2.7.2.15.2.11
--- php-src/ext/libxml/libxml.c:1.32.2.7.2.15.2.10  Wed Dec 31 11:15:38 2008
+++ php-src/ext/libxml/libxml.c Sat Mar 14 17:30:28 2009
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: libxml.c,v 1.32.2.7.2.15.2.10 2008/12/31 11:15:38 sebastian Exp $ */
+/* $Id: libxml.c,v 1.32.2.7.2.15.2.11 2009/03/14 17:30:28 rrichards Exp $ */
 
 #define IS_EXT_MODULE
 
@@ -592,6 +592,7 @@
 
REGISTER_LONG_CONSTANT(LIBXML_VERSION,
LIBXML_VERSION, CONST_CS | CONST_PERSISTENT);
REGISTER_STRING_CONSTANT(LIBXML_DOTTED_VERSION,   
LIBXML_DOTTED_VERSION,  CONST_CS | CONST_PERSISTENT);
+   REGISTER_STRING_CONSTANT(LIBXML_LOADED_VERSION,   (char 
*)xmlParserVersion,   CONST_CS | CONST_PERSISTENT);
 
/* For use with loading xml */
REGISTER_LONG_CONSTANT(LIBXML_NOENT,  XML_PARSE_NOENT,
CONST_CS | CONST_PERSISTENT);
@@ -671,7 +672,8 @@
 {
php_info_print_table_start();
php_info_print_table_row(2, libXML support, active);
-   php_info_print_table_row(2, libXML Version, LIBXML_DOTTED_VERSION);
+   php_info_print_table_row(2, libXML Compiled Version, 
LIBXML_DOTTED_VERSION);
+   php_info_print_table_row(2, libXML Loaded Version, (char 
*)xmlParserVersion);
php_info_print_table_row(2, libXML streams, enabled);
php_info_print_table_end();
 }



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/dom attr.c document.c node.c /ext/dom/tests bug47430.phpt

2009-03-13 Thread Rob Richards
rrichards   Fri Mar 13 13:41:43 2009 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/dom/tests  bug47430.phpt 

  Modified files:  
/php-src/ext/domattr.c document.c node.c 
  Log:
  fix bug #47430 (Errors after writing to nodeValue parameter of an absent 
previousSibling)
  add test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/attr.c?r1=1.18.2.2.2.5r2=1.18.2.2.2.6diff_format=u
Index: php-src/ext/dom/attr.c
diff -u php-src/ext/dom/attr.c:1.18.2.2.2.5 php-src/ext/dom/attr.c:1.18.2.2.2.6
--- php-src/ext/dom/attr.c:1.18.2.2.2.5 Wed Dec 31 11:17:37 2008
+++ php-src/ext/dom/attr.c  Fri Mar 13 13:41:42 2009
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: attr.c,v 1.18.2.2.2.5 2008/12/31 11:17:37 sebastian Exp $ */
+/* $Id: attr.c,v 1.18.2.2.2.6 2009/03/13 13:41:42 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -29,7 +29,6 @@
 
 #include php_dom.h
 
-
 /* {{{ arginfo */
 static
 ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_attr_is_id, 0, 0, 0)
@@ -99,7 +98,6 @@
 
 /* }}} end DOMAttr::__construct */
 
-
 /* {{{ namestring  
 readonly=yes 
 URL: 
http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-1112119403
@@ -124,8 +122,6 @@
 
 /* }}} */
 
-
-
 /* {{{ specified   boolean 
 readonly=yes 
 URL: 
http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-862529273
@@ -141,8 +137,6 @@
 
 /* }}} */
 
-
-
 /* {{{ value   string  
 readonly=no 
 URL: 
http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-221662474
@@ -210,8 +204,6 @@
 
 /* }}} */
 
-
-
 /* {{{ ownerElementDOMElement  
 readonly=yes 
 URL: 
http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Attr-ownerElement
@@ -229,13 +221,14 @@
return FAILURE;
}
 
+   ALLOC_ZVAL(*retval);
+
nodeparent = nodep-parent;
if (!nodeparent) {
-   return FAILURE;
+   ZVAL_NULL(*retval);
+   return SUCCESS;
}
 
-   ALLOC_ZVAL(*retval);
-
if (NULL == (*retval = php_dom_create_object(nodeparent, ret, NULL, 
*retval, obj TSRMLS_CC))) {
php_error_docref(NULL TSRMLS_CC, E_WARNING,  Cannot create 
required DOM object);
return FAILURE;
@@ -246,8 +239,6 @@
 
 /* }}} */
 
-
-
 /* {{{ schemaTypeInfo  DOMTypeInfo 
 readonly=yes 
 URL: 
http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Attr-schemaTypeInfo
@@ -263,8 +254,6 @@
 
 /* }}} */
 
-
-
 /* {{{ proto boolean dom_attr_is_id();
 URL: 
http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Attr-isId
 Since: DOM Level 3
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/document.c?r1=1.68.2.3.2.11r2=1.68.2.3.2.12diff_format=u
Index: php-src/ext/dom/document.c
diff -u php-src/ext/dom/document.c:1.68.2.3.2.11 
php-src/ext/dom/document.c:1.68.2.3.2.12
--- php-src/ext/dom/document.c:1.68.2.3.2.11Mon Jan 26 19:11:19 2009
+++ php-src/ext/dom/document.c  Fri Mar 13 13:41:42 2009
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: document.c,v 1.68.2.3.2.11 2009/01/26 19:11:19 rrichards Exp $ */
+/* $Id: document.c,v 1.68.2.3.2.12 2009/03/13 13:41:42 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -283,12 +283,14 @@
return FAILURE;
}
 
+   ALLOC_ZVAL(*retval);
+
dtdptr = xmlGetIntSubset(docp);
if (!dtdptr) {
-   return FAILURE;
+   ZVAL_NULL(*retval);
+   return SUCCESS;
}
 
-   ALLOC_ZVAL(*retval);
if (NULL == (*retval = php_dom_create_object((xmlNodePtr) dtdptr, ret, 
NULL, *retval, obj TSRMLS_CC))) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Cannot create 
required DOM object);
return FAILURE;
@@ -299,8 +301,6 @@
 
 /* }}} */
 
-
-
 /* {{{ implementation  DOMImplementation   
 readonly=yes 
 URL: 
http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1B793EBA
@@ -315,8 +315,6 @@
 
 /* }}} */
 
-
-
 /* {{{ documentElement DOMElement  
 readonly=yes 
 URL: 
http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-87CD092
@@ -335,12 +333,14 @@
return FAILURE;
}
 
+   ALLOC_ZVAL(*retval);
+
root = xmlDocGetRootElement(docp);
if (!root) {
-   return FAILURE;
+   ZVAL_NULL(*retval);
+   return SUCCESS;
}
 
-   ALLOC_ZVAL(*retval);
if (NULL == (*retval = php_dom_create_object(root, ret, NULL, *retval, 
obj TSRMLS_CC))) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Cannot create 
required DOM object);
return FAILURE;
@@ -421,8 +421,6 @@
 
 /* }}} */
 
-
-
 /* {{{ standalone  boolean 
 readonly=no 
 URL: 

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/dom attr.c document.c node.c /ext/dom/tests bug47430.phpt

2009-03-13 Thread Rob Richards
rrichards   Fri Mar 13 13:43:29 2009 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/dom/tests  bug47430.phpt 

  Modified files:  
/php-src/ext/domattr.c document.c node.c 
  Log:
  MFB: fix bug #47430 (Errors after writing to nodeValue parameter of an absent 
previousSibling)
  add test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/attr.c?r1=1.18.2.2.2.2.2.11r2=1.18.2.2.2.2.2.12diff_format=u
Index: php-src/ext/dom/attr.c
diff -u php-src/ext/dom/attr.c:1.18.2.2.2.2.2.11 
php-src/ext/dom/attr.c:1.18.2.2.2.2.2.12
--- php-src/ext/dom/attr.c:1.18.2.2.2.2.2.11Wed Dec 31 11:15:36 2008
+++ php-src/ext/dom/attr.c  Fri Mar 13 13:43:29 2009
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: attr.c,v 1.18.2.2.2.2.2.11 2008/12/31 11:15:36 sebastian Exp $ */
+/* $Id: attr.c,v 1.18.2.2.2.2.2.12 2009/03/13 13:43:29 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -220,13 +220,14 @@
return FAILURE;
}
 
+   ALLOC_ZVAL(*retval);
+
nodeparent = nodep-parent;
if (!nodeparent) {
-   return FAILURE;
+   ZVAL_NULL(*retval);
+   return SUCCESS;
}
 
-   ALLOC_ZVAL(*retval);
-
if (NULL == (*retval = php_dom_create_object(nodeparent, ret, NULL, 
*retval, obj TSRMLS_CC))) {
php_error_docref(NULL TSRMLS_CC, E_WARNING,  Cannot create 
required DOM object);
return FAILURE;
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/document.c?r1=1.68.2.3.2.5.2.14r2=1.68.2.3.2.5.2.15diff_format=u
Index: php-src/ext/dom/document.c
diff -u php-src/ext/dom/document.c:1.68.2.3.2.5.2.14 
php-src/ext/dom/document.c:1.68.2.3.2.5.2.15
--- php-src/ext/dom/document.c:1.68.2.3.2.5.2.14Mon Jan 26 19:10:53 2009
+++ php-src/ext/dom/document.c  Fri Mar 13 13:43:29 2009
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: document.c,v 1.68.2.3.2.5.2.14 2009/01/26 19:10:53 rrichards Exp $ */
+/* $Id: document.c,v 1.68.2.3.2.5.2.15 2009/03/13 13:43:29 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -251,12 +251,14 @@
return FAILURE;
}
 
+   ALLOC_ZVAL(*retval);
+
dtdptr = xmlGetIntSubset(docp);
if (!dtdptr) {
-   return FAILURE;
+   ZVAL_NULL(*retval);
+   return SUCCESS;
}
 
-   ALLOC_ZVAL(*retval);
if (NULL == (*retval = php_dom_create_object((xmlNodePtr) dtdptr, ret, 
NULL, *retval, obj TSRMLS_CC))) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Cannot create 
required DOM object);
return FAILURE;
@@ -299,12 +301,14 @@
return FAILURE;
}
 
+   ALLOC_ZVAL(*retval);
+
root = xmlDocGetRootElement(docp);
if (!root) {
-   return FAILURE;
+   ZVAL_NULL(*retval);
+   return SUCCESS;
}
 
-   ALLOC_ZVAL(*retval);
if (NULL == (*retval = php_dom_create_object(root, ret, NULL, *retval, 
obj TSRMLS_CC))) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Cannot create 
required DOM object);
return FAILURE;
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/node.c?r1=1.37.2.3.2.8.2.13r2=1.37.2.3.2.8.2.14diff_format=u
Index: php-src/ext/dom/node.c
diff -u php-src/ext/dom/node.c:1.37.2.3.2.8.2.13 
php-src/ext/dom/node.c:1.37.2.3.2.8.2.14
--- php-src/ext/dom/node.c:1.37.2.3.2.8.2.13Tue Jan 13 18:06:48 2009
+++ php-src/ext/dom/node.c  Fri Mar 13 13:43:29 2009
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: node.c,v 1.37.2.3.2.8.2.13 2009/01/13 18:06:48 rrichards Exp $ */
+/* $Id: node.c,v 1.37.2.3.2.8.2.14 2009/03/13 13:43:29 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -260,7 +260,6 @@
break;
default:
php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid 
Node Type);
-   return FAILURE;
}
 
ALLOC_ZVAL(*retval);
@@ -422,13 +421,14 @@
return FAILURE;
}
 
+   ALLOC_ZVAL(*retval);
+
nodeparent = nodep-parent;
if (!nodeparent) {
-   return FAILURE;
+   ZVAL_NULL(*retval);
+   return SUCCESS;
}
 
-   ALLOC_ZVAL(*retval);
-
if (NULL == (*retval = php_dom_create_object(nodeparent, ret, NULL, 
*retval, obj TSRMLS_CC))) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Cannot create 
required DOM object);
return FAILURE;
@@ -491,12 +491,13 @@
first = nodep-children;
}
 
+   ALLOC_ZVAL(*retval);
+
if (!first) {
-   return FAILURE;
+   ZVAL_NULL(*retval);
+   return SUCCESS;
}
 
-   

[PHP-CVS] cvs: php-src /ext/dom attr.c document.c node.c /ext/dom/tests bug47430.phpt

2009-03-13 Thread Rob Richards
rrichards   Fri Mar 13 13:43:57 2009 UTC

  Modified files:  
/php-src/ext/domattr.c document.c node.c 
/php-src/ext/dom/tests  bug47430.phpt 
  Log:
  MFB: fix bug #47430 (Errors after writing to nodeValue parameter of an absent 
previousSibling)
  add test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/attr.c?r1=1.38r2=1.39diff_format=u
Index: php-src/ext/dom/attr.c
diff -u php-src/ext/dom/attr.c:1.38 php-src/ext/dom/attr.c:1.39
--- php-src/ext/dom/attr.c:1.38 Tue Mar 10 23:39:12 2009
+++ php-src/ext/dom/attr.c  Fri Mar 13 13:43:57 2009
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: attr.c,v 1.38 2009/03/10 23:39:12 helly Exp $ */
+/* $Id: attr.c,v 1.39 2009/03/13 13:43:57 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -220,13 +220,14 @@
return FAILURE;
}
 
+   ALLOC_ZVAL(*retval);
+
nodeparent = nodep-parent;
if (!nodeparent) {
-   return FAILURE;
+   ZVAL_NULL(*retval);
+   return SUCCESS;
}
 
-   ALLOC_ZVAL(*retval);
-
if (NULL == (*retval = php_dom_create_object(nodeparent, ret, NULL, 
*retval, obj TSRMLS_CC))) {
php_error_docref(NULL TSRMLS_CC, E_WARNING,  Cannot create 
required DOM object);
return FAILURE;
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/document.c?r1=1.101r2=1.102diff_format=u
Index: php-src/ext/dom/document.c
diff -u php-src/ext/dom/document.c:1.101 php-src/ext/dom/document.c:1.102
--- php-src/ext/dom/document.c:1.101Tue Mar 10 23:39:12 2009
+++ php-src/ext/dom/document.c  Fri Mar 13 13:43:57 2009
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: document.c,v 1.101 2009/03/10 23:39:12 helly Exp $ */
+/* $Id: document.c,v 1.102 2009/03/13 13:43:57 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -253,12 +253,14 @@
return FAILURE;
}
 
+   ALLOC_ZVAL(*retval);
+
dtdptr = xmlGetIntSubset(docp);
if (!dtdptr) {
-   return FAILURE;
+   ZVAL_NULL(*retval);
+   return SUCCESS;
}
 
-   ALLOC_ZVAL(*retval);
if (NULL == (*retval = php_dom_create_object((xmlNodePtr) dtdptr, ret, 
NULL, *retval, obj TSRMLS_CC))) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Cannot create 
required DOM object);
return FAILURE;
@@ -301,12 +303,14 @@
return FAILURE;
}
 
+   ALLOC_ZVAL(*retval);
+
root = xmlDocGetRootElement(docp);
if (!root) {
-   return FAILURE;
+   ZVAL_NULL(*retval);
+   return SUCCESS;
}
 
-   ALLOC_ZVAL(*retval);
if (NULL == (*retval = php_dom_create_object(root, ret, NULL, *retval, 
obj TSRMLS_CC))) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Cannot create 
required DOM object);
return FAILURE;
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/node.c?r1=1.70r2=1.71diff_format=u
Index: php-src/ext/dom/node.c
diff -u php-src/ext/dom/node.c:1.70 php-src/ext/dom/node.c:1.71
--- php-src/ext/dom/node.c:1.70 Tue Mar 10 23:39:13 2009
+++ php-src/ext/dom/node.c  Fri Mar 13 13:43:57 2009
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: node.c,v 1.70 2009/03/10 23:39:13 helly Exp $ */
+/* $Id: node.c,v 1.71 2009/03/13 13:43:57 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -260,7 +260,6 @@
break;
default:
php_error_docref(NULL TSRMLS_CC, E_WARNING, Invalid 
Node Type);
-   return FAILURE;
}
 
ALLOC_ZVAL(*retval);
@@ -422,13 +421,14 @@
return FAILURE;
}
 
+   ALLOC_ZVAL(*retval);
+
nodeparent = nodep-parent;
if (!nodeparent) {
-   return FAILURE;
+   ZVAL_NULL(*retval);
+   return SUCCESS;
}
 
-   ALLOC_ZVAL(*retval);
-
if (NULL == (*retval = php_dom_create_object(nodeparent, ret, NULL, 
*retval, obj TSRMLS_CC))) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Cannot create 
required DOM object);
return FAILURE;
@@ -491,12 +491,13 @@
first = nodep-children;
}
 
+   ALLOC_ZVAL(*retval);
+
if (!first) {
-   return FAILURE;
+   ZVAL_NULL(*retval);
+   return SUCCESS;
}
 
-   ALLOC_ZVAL(*retval);
-
if (NULL == (*retval = php_dom_create_object(first, ret, NULL, 
*retval, obj TSRMLS_CC))) {
php_error_docref(NULL TSRMLS_CC, E_WARNING, Cannot create 
required DOM object);
return FAILURE;
@@ -527,12 +528,13 @@
last = nodep-last;
}
 
+   ALLOC_ZVAL(*retval);
+

[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS

2009-03-13 Thread Rob Richards
rrichards   Fri Mar 13 13:45:08 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  BFN
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1435r2=1.2027.2.547.2.1436diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1435 php-src/NEWS:1.2027.2.547.2.1436
--- php-src/NEWS:1.2027.2.547.2.1435Thu Mar 12 22:54:15 2009
+++ php-src/NEWSFri Mar 13 13:45:07 2009
@@ -10,6 +10,8 @@
   (Kalle)
 - Fixed bug #47435 (FILTER_FLAG_NO_PRIV_RANGE does not work with ipv6
   addresses in the filter extension). (Ilia)
+- Fixed bug #47430 (Errors after writing to nodeValue parameter of an absent 
+  previousSibling). (Rob)
 
 26 Feb 2009, PHP 5.2.9
 - Changed __call() to be invoked on private/protected method access, similar to



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /win32/build config.w32

2009-03-13 Thread Rob Richards
rrichards   Fri Mar 13 14:39:08 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/win32/buildconfig.w32 
  Log:
  fix build for VC9
  
http://cvs.php.net/viewvc.cgi/php-src/win32/build/config.w32?r1=1.40.2.8.2.11r2=1.40.2.8.2.12diff_format=u
Index: php-src/win32/build/config.w32
diff -u php-src/win32/build/config.w32:1.40.2.8.2.11 
php-src/win32/build/config.w32:1.40.2.8.2.12
--- php-src/win32/build/config.w32:1.40.2.8.2.11Fri Oct 10 23:38:14 2008
+++ php-src/win32/build/config.w32  Fri Mar 13 14:39:08 2009
@@ -1,5 +1,5 @@
 // vim:ft=javascript
-// $Id: config.w32,v 1.40.2.8.2.11 2008/10/10 23:38:14 pajoye Exp $
+// $Id: config.w32,v 1.40.2.8.2.12 2009/03/13 14:39:08 rrichards Exp $
 // Master config file; think of it as a configure.in
 // equivalent.
 
@@ -312,6 +312,10 @@
strlcat.c mergesort.c reentrancy.c php_variables.c php_ticks.c 
network.c \
php_open_temporary_file.c php_logos.c output.c internal_functions.c 
php_sprintf.c);
 
+if (VCVERS = 14) {
+   AC_DEFINE('HAVE_STRNLEN', 1);
+}
+
 ADD_SOURCES(main/streams, streams.c cast.c memory.c filter.c 
plain_wrapper.c \
userspace.c transports.c xp_socket.c mmap.c);
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/libxml libxml.c

2009-03-13 Thread Rob Richards
rrichards   Fri Mar 13 19:35:14 2009 UTC

  Modified files:  
/php-src/ext/libxml libxml.c 
  Log:
  add LIBXML_LOADED_VERSION constant that contains currently loaded libxml2 
version
  add libxml2 version being used to info output
  
http://cvs.php.net/viewvc.cgi/php-src/ext/libxml/libxml.c?r1=1.74r2=1.75diff_format=u
Index: php-src/ext/libxml/libxml.c
diff -u php-src/ext/libxml/libxml.c:1.74 php-src/ext/libxml/libxml.c:1.75
--- php-src/ext/libxml/libxml.c:1.74Tue Mar 10 23:39:27 2009
+++ php-src/ext/libxml/libxml.c Fri Mar 13 19:35:14 2009
@@ -17,7 +17,7 @@
+--+
  */
 
-/* $Id: libxml.c,v 1.74 2009/03/10 23:39:27 helly Exp $ */
+/* $Id: libxml.c,v 1.75 2009/03/13 19:35:14 rrichards Exp $ */
 
 #define IS_EXT_MODULE
 
@@ -592,6 +592,7 @@
 
REGISTER_LONG_CONSTANT(LIBXML_VERSION,
LIBXML_VERSION, CONST_CS | CONST_PERSISTENT);
REGISTER_STRING_CONSTANT(LIBXML_DOTTED_VERSION,   
LIBXML_DOTTED_VERSION,  CONST_CS | CONST_PERSISTENT);
+   REGISTER_STRING_CONSTANT(LIBXML_LOADED_VERSION,   (char 
*)xmlParserVersion,   CONST_CS | CONST_PERSISTENT);
 
/* For use with loading xml */
REGISTER_LONG_CONSTANT(LIBXML_NOENT,  XML_PARSE_NOENT,
CONST_CS | CONST_PERSISTENT);
@@ -671,7 +672,8 @@
 {
php_info_print_table_start();
php_info_print_table_row(2, libXML support, active);
-   php_info_print_table_row(2, libXML Version, LIBXML_DOTTED_VERSION);
+   php_info_print_table_row(2, libXML Compiled Version, 
LIBXML_DOTTED_VERSION);
+   php_info_print_table_row(2, libXML Loaded Version, (char 
*)xmlParserVersion);
php_info_print_table_row(2, libXML streams, enabled);
php_info_print_table_end();
 }



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/dom document.c

2009-01-26 Thread Rob Richards
rrichards   Mon Jan 26 19:10:10 2009 UTC

  Modified files:  
/php-src/ext/domdocument.c 
  Log:
  fix bug #47220 (segfault in dom_document_parser in recovery mode)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/document.c?r1=1.99r2=1.100diff_format=u
Index: php-src/ext/dom/document.c
diff -u php-src/ext/dom/document.c:1.99 php-src/ext/dom/document.c:1.100
--- php-src/ext/dom/document.c:1.99 Wed Dec 31 11:12:30 2008
+++ php-src/ext/dom/document.c  Mon Jan 26 19:10:09 2009
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: document.c,v 1.99 2008/12/31 11:12:30 sebastian Exp $ */
+/* $Id: document.c,v 1.100 2009/01/26 19:10:09 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -1627,7 +1627,7 @@
EG(error_reporting) = old_error_reporting;
}
/* If loading from memory, set the base reference uri for the 
document */
-   if (ret-URL == NULL  ctxt-directory != NULL) {
+   if (ret  ret-URL == NULL  ctxt-directory != NULL) {
ret-URL = xmlStrdup(ctxt-directory);
}
} else {



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/dom document.c

2009-01-26 Thread Rob Richards
rrichards   Mon Jan 26 19:10:54 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/domdocument.c 
  Log:
  MFH: fix bug #47220 (segfault in dom_document_parser in recovery mode)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/document.c?r1=1.68.2.3.2.5.2.13r2=1.68.2.3.2.5.2.14diff_format=u
Index: php-src/ext/dom/document.c
diff -u php-src/ext/dom/document.c:1.68.2.3.2.5.2.13 
php-src/ext/dom/document.c:1.68.2.3.2.5.2.14
--- php-src/ext/dom/document.c:1.68.2.3.2.5.2.13Wed Dec 31 11:15:36 2008
+++ php-src/ext/dom/document.c  Mon Jan 26 19:10:53 2009
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: document.c,v 1.68.2.3.2.5.2.13 2008/12/31 11:15:36 sebastian Exp $ */
+/* $Id: document.c,v 1.68.2.3.2.5.2.14 2009/01/26 19:10:53 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -1625,7 +1625,7 @@
EG(error_reporting) = old_error_reporting;
}
/* If loading from memory, set the base reference uri for the 
document */
-   if (ret-URL == NULL  ctxt-directory != NULL) {
+   if (ret  ret-URL == NULL  ctxt-directory != NULL) {
ret-URL = xmlStrdup(ctxt-directory);
}
} else {



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/dom document.c

2009-01-26 Thread Rob Richards
rrichards   Mon Jan 26 19:11:20 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/domdocument.c 
  Log:
  MFH: fix bug #47220 (segfault in dom_document_parser in recovery mode)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/document.c?r1=1.68.2.3.2.10r2=1.68.2.3.2.11diff_format=u
Index: php-src/ext/dom/document.c
diff -u php-src/ext/dom/document.c:1.68.2.3.2.10 
php-src/ext/dom/document.c:1.68.2.3.2.11
--- php-src/ext/dom/document.c:1.68.2.3.2.10Wed Dec 31 11:17:37 2008
+++ php-src/ext/dom/document.c  Mon Jan 26 19:11:19 2009
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: document.c,v 1.68.2.3.2.10 2008/12/31 11:17:37 sebastian Exp $ */
+/* $Id: document.c,v 1.68.2.3.2.11 2009/01/26 19:11:19 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -1687,7 +1687,7 @@
EG(error_reporting) = old_error_reporting;
}
/* If loading from memory, set the base reference uri for the 
document */
-   if (ret-URL == NULL  ctxt-directory != NULL) {
+   if (ret  ret-URL == NULL  ctxt-directory != NULL) {
ret-URL = xmlStrdup(ctxt-directory);
}
} else {



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS

2009-01-26 Thread Rob Richards
rrichards   Mon Jan 26 19:12:12 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  BFN
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1402r2=1.2027.2.547.2.1403diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1402 php-src/NEWS:1.2027.2.547.2.1403
--- php-src/NEWS:1.2027.2.547.2.1402Mon Jan 26 15:25:25 2009
+++ php-src/NEWSMon Jan 26 19:12:10 2009
@@ -17,6 +17,7 @@
 - Fixed bug in xml_error_string() which resulted in messages being
   off by one. (Scott)
 
+- Fixed bug #47220 (segfault in dom_document_parser in recovery mode). (Rob)
 - Fixed bug #47217 (content-type is not set properly for file uploads).
   (Ilia)
 - Fixed bug #47174 (base64_decode() interprets pad char in mid string as



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/dom dom_fe.h node.c

2009-01-13 Thread Rob Richards
rrichards   Tue Jan 13 18:05:41 2009 UTC

  Modified files:  
/php-src/ext/domdom_fe.h node.c 
  Log:
  Add method DomNode::getLineNo to return line number for a parsed node
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/dom_fe.h?r1=1.24r2=1.25diff_format=u
Index: php-src/ext/dom/dom_fe.h
diff -u php-src/ext/dom/dom_fe.h:1.24 php-src/ext/dom/dom_fe.h:1.25
--- php-src/ext/dom/dom_fe.h:1.24   Wed Dec 31 11:12:30 2008
+++ php-src/ext/dom/dom_fe.hTue Jan 13 18:05:41 2009
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: dom_fe.h,v 1.24 2008/12/31 11:12:30 sebastian Exp $ */
+/* $Id: dom_fe.h,v 1.25 2009/01/13 18:05:41 rrichards Exp $ */
 #ifndef DOM_FE_H
 #define DOM_FE_H
 
@@ -168,6 +168,7 @@
 PHP_METHOD(domnode, C14N);
 PHP_METHOD(domnode, C14NFile);
 PHP_METHOD(domnode, getNodePath);
+PHP_METHOD(domnode, getLineNo);
 
 /* domnodelist methods */
 PHP_FUNCTION(dom_nodelist_item);
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/node.c?r1=1.68r2=1.69diff_format=u
Index: php-src/ext/dom/node.c
diff -u php-src/ext/dom/node.c:1.68 php-src/ext/dom/node.c:1.69
--- php-src/ext/dom/node.c:1.68 Wed Dec 31 11:12:30 2008
+++ php-src/ext/dom/node.c  Tue Jan 13 18:05:41 2009
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: node.c,v 1.68 2008/12/31 11:12:30 sebastian Exp $ */
+/* $Id: node.c,v 1.69 2009/01/13 18:05:41 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -106,6 +106,9 @@
 ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_getNodePath, 0, 0, 0)
 ZEND_END_ARG_INFO();
 
+ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_getLineNo, 0, 0, 0)
+ZEND_END_ARG_INFO();
+
 ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_C14N, 0, 0, 0)
ZEND_ARG_INFO(0, exclusive)
ZEND_ARG_INFO(0, with_comments)
@@ -149,6 +152,7 @@
PHP_FALIAS(setUserData, dom_node_set_user_data, 
arginfo_dom_node_set_user_data)
PHP_FALIAS(getUserData, dom_node_get_user_data, 
arginfo_dom_node_get_user_data)
PHP_ME(domnode, getNodePath, arginfo_dom_node_getNodePath, 
ZEND_ACC_PUBLIC)
+   PHP_ME(domnode, getLineNo, arginfo_dom_node_getLineNo, ZEND_ACC_PUBLIC)
PHP_ME(domnode, C14N, arginfo_dom_node_C14N, ZEND_ACC_PUBLIC)
PHP_ME(domnode, C14NFile, arginfo_dom_node_C14NFile, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
@@ -2029,6 +2033,24 @@
 }
 /* }}} */
 
+/* {{{ proto int DOMNode::getLineNo()
+   Gets line number for a node */
+PHP_METHOD(domnode, getLineNo)
+{
+   zval *id;
+   xmlNode *nodep;
+   dom_object *intern;
+   
+   if (zend_parse_parameters_none() == FAILURE) {
+   return;
+   }
+
+   DOM_GET_THIS_OBJ(nodep, id, xmlNodePtr, intern);
+
+   RETURN_LONG(xmlGetLineNo(nodep));
+}
+/* }}} */
+
 #endif
 
 /*



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS

2009-01-13 Thread Rob Richards
rrichards   Tue Jan 13 18:13:01 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
  Log:
  news
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.450r2=1.2027.2.547.2.965.2.451diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.450 
php-src/NEWS:1.2027.2.547.2.965.2.451
--- php-src/NEWS:1.2027.2.547.2.965.2.450   Tue Jan 13 02:54:37 2009
+++ php-src/NEWSTue Jan 13 18:13:01 2009
@@ -16,6 +16,7 @@
 - Re-enabled socket_create_pair() on Windows. (Kalle)
 - Fixed building of pdo_sqlite without sqlite3. (Scott)
 
+- Added DOMNode:getLineNo to get line number of parsed node. (Rob)
 - Added table info to PDO::getColumnMeta() with SQLite. (Martin Jansen, Scott)
 - Added support for old style DNS functions. (Scott)
 - Added mail logging functionality that allows logging of mail sent via



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/xml compat.c

2009-01-11 Thread Rob Richards
rrichards   Sun Jan 11 12:00:31 2009 UTC

  Modified files:  
/php-src/ext/xmlcompat.c 
  Log:
  fix bug #45996 (libxml2 2.7 causes breakage with character data in 
xml_parse())
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xml/compat.c?r1=1.52r2=1.53diff_format=u
Index: php-src/ext/xml/compat.c
diff -u php-src/ext/xml/compat.c:1.52 php-src/ext/xml/compat.c:1.53
--- php-src/ext/xml/compat.c:1.52   Wed Dec 31 11:12:38 2008
+++ php-src/ext/xml/compat.cSun Jan 11 12:00:30 2009
@@ -482,6 +482,10 @@
parser-parser-charset = XML_CHAR_ENCODING_NONE;
 #endif
 
+#if LIBXML_VERSION = 20703
+   xmlCtxtUseOptions(parser-parser, XML_PARSE_OLDSAX);
+#endif
+
parser-parser-replaceEntities = 1;
parser-parser-wellFormed = 0;
if (sep != NULL) {



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/xml compat.c

2009-01-11 Thread Rob Richards
rrichards   Sun Jan 11 12:01:16 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/xmlcompat.c 
  Log:
  MFH: fix bug #45996 (libxml2 2.7 causes breakage with character data in 
xml_parse())
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xml/compat.c?r1=1.44.2.4.2.1.2.3r2=1.44.2.4.2.1.2.4diff_format=u
Index: php-src/ext/xml/compat.c
diff -u php-src/ext/xml/compat.c:1.44.2.4.2.1.2.3 
php-src/ext/xml/compat.c:1.44.2.4.2.1.2.4
--- php-src/ext/xml/compat.c:1.44.2.4.2.1.2.3   Wed Dec 31 11:15:46 2008
+++ php-src/ext/xml/compat.cSun Jan 11 12:01:16 2009
@@ -482,6 +482,10 @@
parser-parser-charset = XML_CHAR_ENCODING_NONE;
 #endif
 
+#if LIBXML_VERSION = 20703
+   xmlCtxtUseOptions(parser-parser, XML_PARSE_OLDSAX);
+#endif
+
parser-parser-replaceEntities = 1;
parser-parser-wellFormed = 0;
if (sep != NULL) {



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/xml compat.c

2009-01-11 Thread Rob Richards
rrichards   Sun Jan 11 12:01:55 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/xmlcompat.c 
  Log:
  MFH: fix bug #45996 (libxml2 2.7 causes breakage with character data in 
xml_parse())
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xml/compat.c?r1=1.44.2.4.2.4r2=1.44.2.4.2.5diff_format=u
Index: php-src/ext/xml/compat.c
diff -u php-src/ext/xml/compat.c:1.44.2.4.2.4 
php-src/ext/xml/compat.c:1.44.2.4.2.5
--- php-src/ext/xml/compat.c:1.44.2.4.2.4   Wed Dec 31 11:17:46 2008
+++ php-src/ext/xml/compat.cSun Jan 11 12:01:55 2009
@@ -482,6 +482,10 @@
parser-parser-charset = XML_CHAR_ENCODING_NONE;
 #endif
 
+#if LIBXML_VERSION = 20703
+   xmlCtxtUseOptions(parser-parser, XML_PARSE_OLDSAX);
+#endif
+
parser-parser-replaceEntities = 1;
parser-parser-wellFormed = 0;
if (sep != NULL) {



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS

2009-01-11 Thread Rob Richards
rrichards   Sun Jan 11 12:03:44 2009 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  BFN
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1388r2=1.2027.2.547.2.1389diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1388 php-src/NEWS:1.2027.2.547.2.1389
--- php-src/NEWS:1.2027.2.547.2.1388Sat Jan 10 17:39:28 2009
+++ php-src/NEWSSun Jan 11 12:03:43 2009
@@ -46,6 +46,8 @@
 - Fixed bug #46699 (xml_parse crash when parser is namespace aware). (Rob)
 - Fixed bug #46005 (User not consistently logged under Apache2). 
   (admorten at umich dot edu, Stas)
+- Fixed bug #45996 (libxml2 2.7 causes breakage with character data 
+  in xml_parse()). (Rob)
 - Fixed bug #45161 (Reusing a curl handle leaks memory). (Mark Karpeles, Jani)
 - Fixed bug #35975 (Session cookie expires date format isn't the most 
compatible.
   Now matches that of setcookie()). (Scott)



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/pcre php_pcre.def

2009-01-11 Thread Rob Richards
rrichards   Sun Jan 11 13:58:33 2009 UTC

  Modified files:  
/php-src/ext/pcre   php_pcre.def 
  Log:
  export php_pcre_free to make mbstring happy
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/php_pcre.def?r1=1.3r2=1.4diff_format=u
Index: php-src/ext/pcre/php_pcre.def
diff -u php-src/ext/pcre/php_pcre.def:1.3 php-src/ext/pcre/php_pcre.def:1.4
--- php-src/ext/pcre/php_pcre.def:1.3   Mon Feb 26 12:37:57 2007
+++ php-src/ext/pcre/php_pcre.def   Sun Jan 11 13:58:33 2009
@@ -9,3 +9,4 @@
 php_pcre_study
 php_pcre_version
 php_pcre_fullinfo
+php_pcre_free



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/pcre php_pcre.def

2009-01-11 Thread Rob Richards
rrichards   Sun Jan 11 13:59:00 2009 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/pcre   php_pcre.def 
  Log:
  MFH: export php_pcre_free to make mbstring happy
  
http://cvs.php.net/viewvc.cgi/php-src/ext/pcre/php_pcre.def?r1=1.1.2.3.2.1r2=1.1.2.3.2.1.2.1diff_format=u
Index: php-src/ext/pcre/php_pcre.def
diff -u php-src/ext/pcre/php_pcre.def:1.1.2.3.2.1 
php-src/ext/pcre/php_pcre.def:1.1.2.3.2.1.2.1
--- php-src/ext/pcre/php_pcre.def:1.1.2.3.2.1   Mon Feb 26 12:38:34 2007
+++ php-src/ext/pcre/php_pcre.def   Sun Jan 11 13:59:00 2009
@@ -9,3 +9,4 @@
 php_pcre_study
 php_pcre_version
 php_pcre_fullinfo
+php_pcre_free



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/libxml php_libxml2.def

2008-12-27 Thread Rob Richards
rrichards   Sat Dec 27 12:14:56 2008 UTC

  Modified files:  
/php-src/ext/libxml php_libxml2.def 
  Log:
  add missing exports
  
http://cvs.php.net/viewvc.cgi/php-src/ext/libxml/php_libxml2.def?r1=1.8r2=1.9diff_format=u
Index: php-src/ext/libxml/php_libxml2.def
diff -u php-src/ext/libxml/php_libxml2.def:1.8 
php-src/ext/libxml/php_libxml2.def:1.9
--- php-src/ext/libxml/php_libxml2.def:1.8  Sun Jan 27 16:32:37 2008
+++ php-src/ext/libxml/php_libxml2.def  Sat Dec 27 12:14:56 2008
@@ -1052,9 +1052,11 @@
 xmlTextReaderReadString
 xmlTextReaderRelaxNGSetSchema
 xmlTextReaderRelaxNGValidate
+xmlTextReaderSchemaValidate
 xmlTextReaderSetErrorHandler
 xmlTextReaderSetParserProp
 xmlTextReaderSetStructuredErrorHandler
+xmlTextReaderSetup
 xmlTextReaderStandalone
 xmlTextReaderValue
 xmlTextReaderXmlLang



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/libxml php_libxml2.def

2008-12-27 Thread Rob Richards
rrichards   Sat Dec 27 12:16:12 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/libxml php_libxml2.def 
  Log:
  MFH: add missing exports
  
http://cvs.php.net/viewvc.cgi/php-src/ext/libxml/php_libxml2.def?r1=1.4.2.1.2.2.2.1r2=1.4.2.1.2.2.2.2diff_format=u
Index: php-src/ext/libxml/php_libxml2.def
diff -u php-src/ext/libxml/php_libxml2.def:1.4.2.1.2.2.2.1 
php-src/ext/libxml/php_libxml2.def:1.4.2.1.2.2.2.2
--- php-src/ext/libxml/php_libxml2.def:1.4.2.1.2.2.2.1  Sun Jan 27 16:33:01 2008
+++ php-src/ext/libxml/php_libxml2.def  Sat Dec 27 12:16:12 2008
@@ -1052,9 +1052,11 @@
 xmlTextReaderReadString
 xmlTextReaderRelaxNGSetSchema
 xmlTextReaderRelaxNGValidate
+xmlTextReaderSchemaValidate
 xmlTextReaderSetErrorHandler
 xmlTextReaderSetParserProp
 xmlTextReaderSetStructuredErrorHandler
+xmlTextReaderSetup
 xmlTextReaderStandalone
 xmlTextReaderValue
 xmlTextReaderXmlLang



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/simplexml config.w32 php_simplexml.h

2008-12-27 Thread Rob Richards
rrichards   Sat Dec 27 12:22:38 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/simplexml  config.w32 php_simplexml.h 
  Log:
  MFH: proper exports/imports for win32
  
http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/config.w32?r1=1.4.8.6r2=1.4.8.7diff_format=u
Index: php-src/ext/simplexml/config.w32
diff -u php-src/ext/simplexml/config.w32:1.4.8.6 
php-src/ext/simplexml/config.w32:1.4.8.7
--- php-src/ext/simplexml/config.w32:1.4.8.6Fri Dec 26 14:13:38 2008
+++ php-src/ext/simplexml/config.w32Sat Dec 27 12:22:38 2008
@@ -1,4 +1,4 @@
-// $Id: config.w32,v 1.4.8.6 2008/12/26 14:13:38 pajoye Exp $
+// $Id: config.w32,v 1.4.8.7 2008/12/27 12:22:38 rrichards Exp $
 // vim:ft=javascript
 
 ARG_WITH(simplexml, Simple XML support, yes);
@@ -15,6 +15,7 @@
if (!ADD_EXTENSION_DEP('simplexml', 'spl', true)) {
MESSAGE(\tSPL support in simplexml disabled);
}
+   ADD_FLAG(CFLAGS_SIMPLEXML, /D PHP_SIMPLEXML_EXPORTS );
} else {
PHP_SIMPLEXML == no;
WARNING(simplexml not enabled; libraries and headers not 
found);
http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/php_simplexml.h?r1=1.20.2.2.2.3.2.5r2=1.20.2.2.2.3.2.6diff_format=u
Index: php-src/ext/simplexml/php_simplexml.h
diff -u php-src/ext/simplexml/php_simplexml.h:1.20.2.2.2.3.2.5 
php-src/ext/simplexml/php_simplexml.h:1.20.2.2.2.3.2.6
--- php-src/ext/simplexml/php_simplexml.h:1.20.2.2.2.3.2.5  Sat Dec 27 
01:07:49 2008
+++ php-src/ext/simplexml/php_simplexml.h   Sat Dec 27 12:22:38 2008
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_simplexml.h,v 1.20.2.2.2.3.2.5 2008/12/27 01:07:49 rrichards Exp $ 
*/
+/* $Id: php_simplexml.h,v 1.20.2.2.2.3.2.6 2008/12/27 12:22:38 rrichards Exp $ 
*/
 
 #ifndef PHP_SIMPLEXML_H
 #define PHP_SIMPLEXML_H
@@ -77,7 +77,15 @@
 #define SIMPLEXML_G(v) (simplexml_globals.v)
 #endif
 
-#define PHP_SXE_API ZEND_DLEXPORT
+#ifdef PHP_WIN32
+#  ifdef PHP_SIMPLEXML_EXPORTS
+#  define PHP_SXE_API __declspec(dllexport)
+#  else
+#  define PHP_SXE_API __declspec(dllimport)
+#  endif
+#else
+#  define PHP_SXE_API ZEND_API
+#endif
 
 PHP_SXE_API zend_class_entry *sxe_get_element_class_entry();
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/simplexml config.w32 php_simplexml.h

2008-12-27 Thread Rob Richards
rrichards   Sat Dec 27 12:21:36 2008 UTC

  Modified files:  
/php-src/ext/simplexml  config.w32 php_simplexml.h 
  Log:
  proper exports/imports for win32
  
http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/config.w32?r1=1.7r2=1.8diff_format=u
Index: php-src/ext/simplexml/config.w32
diff -u php-src/ext/simplexml/config.w32:1.7 
php-src/ext/simplexml/config.w32:1.8
--- php-src/ext/simplexml/config.w32:1.7Fri Dec 26 14:16:38 2008
+++ php-src/ext/simplexml/config.w32Sat Dec 27 12:21:36 2008
@@ -1,4 +1,4 @@
-// $Id: config.w32,v 1.7 2008/12/26 14:16:38 pajoye Exp $
+// $Id: config.w32,v 1.8 2008/12/27 12:21:36 rrichards Exp $
 // vim:ft=javascript
 
 ARG_WITH(simplexml, Simple XML support, yes);
@@ -13,6 +13,7 @@
if (!ADD_EXTENSION_DEP('simplexml', 'spl', true)) {
MESSAGE(\tSPL support in simplexml disabled);
}
+   ADD_FLAG(CFLAGS_SIMPLEXML, /D PHP_SIMPLEXML_EXPORTS );
} else {
PHP_SIMPLEXML == no;
WARNING(simplexml not enabled; libraries and headers not 
found);
http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/php_simplexml.h?r1=1.32r2=1.33diff_format=u
Index: php-src/ext/simplexml/php_simplexml.h
diff -u php-src/ext/simplexml/php_simplexml.h:1.32 
php-src/ext/simplexml/php_simplexml.h:1.33
--- php-src/ext/simplexml/php_simplexml.h:1.32  Sat Dec 27 01:07:18 2008
+++ php-src/ext/simplexml/php_simplexml.h   Sat Dec 27 12:21:36 2008
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_simplexml.h,v 1.32 2008/12/27 01:07:18 rrichards Exp $ */
+/* $Id: php_simplexml.h,v 1.33 2008/12/27 12:21:36 rrichards Exp $ */
 
 #ifndef PHP_SIMPLEXML_H
 #define PHP_SIMPLEXML_H
@@ -77,7 +77,15 @@
 #define SIMPLEXML_G(v) (simplexml_globals.v)
 #endif
 
-#define PHP_SXE_API ZEND_DLEXPORT
+#ifdef PHP_WIN32
+#  ifdef PHP_SIMPLEXML_EXPORTS
+#  define PHP_SXE_API __declspec(dllexport)
+#  else
+#  define PHP_SXE_API __declspec(dllimport)
+#  endif
+#else
+#  define PHP_SXE_API ZEND_API
+#endif
 
 PHP_SXE_API zend_class_entry *sxe_get_element_class_entry(TSRMLS_D);
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/simplexml php_simplexml.h php_simplexml_exports.h simplexml.c

2008-12-26 Thread Rob Richards
rrichards   Fri Dec 26 20:27:14 2008 UTC

  Modified files:  
/php-src/ext/simplexml  php_simplexml.h php_simplexml_exports.h 
simplexml.c 
  Log:
  properly export functions
  
http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/php_simplexml.h?r1=1.30r2=1.31diff_format=u
Index: php-src/ext/simplexml/php_simplexml.h
diff -u php-src/ext/simplexml/php_simplexml.h:1.30 
php-src/ext/simplexml/php_simplexml.h:1.31
--- php-src/ext/simplexml/php_simplexml.h:1.30  Wed Jul  9 21:27:10 2008
+++ php-src/ext/simplexml/php_simplexml.h   Fri Dec 26 20:27:14 2008
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_simplexml.h,v 1.30 2008/07/09 21:27:10 colder Exp $ */
+/* $Id: php_simplexml.h,v 1.31 2008/12/26 20:27:14 rrichards Exp $ */
 
 #ifndef PHP_SIMPLEXML_H
 #define PHP_SIMPLEXML_H
@@ -77,7 +77,19 @@
 #define SIMPLEXML_G(v) (simplexml_globals.v)
 #endif
 
-ZEND_API zend_class_entry *sxe_get_element_class_entry(TSRMLS_D);
+#ifdef PHP_WIN32
+#ifdef SIMPLEXML_EXPORTS
+#define PHP_SXE_API __declspec(dllexport)
+#else
+#define PHP_SXE_API __declspec(dllimport)
+#endif /* SIMPLEXML_EXPORTS */
+#elif defined(__GNUC__)  __GNUC__ = 4
+#define PHP_SXE_API __attribute__ ((visibility(default)))
+#else
+#define PHP_SXE_API
+#endif /* PHP_WIN32 */
+
+PHP_SXE_API zend_class_entry *sxe_get_element_class_entry(TSRMLS_D);
 
 #endif
 
http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/php_simplexml_exports.h?r1=1.8r2=1.9diff_format=u
Index: php-src/ext/simplexml/php_simplexml_exports.h
diff -u php-src/ext/simplexml/php_simplexml_exports.h:1.8 
php-src/ext/simplexml/php_simplexml_exports.h:1.9
--- php-src/ext/simplexml/php_simplexml_exports.h:1.8   Mon Dec 31 07:12:14 2007
+++ php-src/ext/simplexml/php_simplexml_exports.h   Fri Dec 26 20:27:14 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: php_simplexml_exports.h,v 1.8 2007/12/31 07:12:14 sebastian Exp $ */
+/* $Id: php_simplexml_exports.h,v 1.9 2008/12/26 20:27:14 rrichards Exp $ */
 
 #ifndef PHP_SIMPLEXML_EXPORTS_H
 #define PHP_SIMPLEXML_EXPORTS_H
@@ -39,7 +39,7 @@
} \
 }
 
-ZEND_API zend_object_value sxe_object_new(zend_class_entry *ce TSRMLS_DC);
+PHP_SXE_API zend_object_value sxe_object_new(zend_class_entry *ce TSRMLS_DC);
 /* {{{ php_sxe_fetch_object()
  */
 static inline php_sxe_object *
http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/simplexml.c?r1=1.269r2=1.270diff_format=u
Index: php-src/ext/simplexml/simplexml.c
diff -u php-src/ext/simplexml/simplexml.c:1.269 
php-src/ext/simplexml/simplexml.c:1.270
--- php-src/ext/simplexml/simplexml.c:1.269 Wed Nov 19 01:59:07 2008
+++ php-src/ext/simplexml/simplexml.c   Fri Dec 26 20:27:14 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: simplexml.c,v 1.269 2008/11/19 01:59:07 colder Exp $ */
+/* $Id: simplexml.c,v 1.270 2008/12/26 20:27:14 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -39,7 +39,7 @@
 
 zend_class_entry *sxe_class_entry = NULL;
 
-ZEND_API zend_class_entry *sxe_get_element_class_entry(TSRMLS_D) /* {{{ */
+PHP_SXE_API zend_class_entry *sxe_get_element_class_entry(TSRMLS_D) /* {{{ */
 {
return sxe_class_entry;
 }
@@ -2117,7 +2117,7 @@
 
 /* {{{ sxe_object_new()
  */
-ZEND_API zend_object_value
+PHP_SXE_API zend_object_value
 sxe_object_new(zend_class_entry *ce TSRMLS_DC)
 {
php_sxe_object*intern;
@@ -2424,7 +2424,7 @@
 }
 /* }}} */
 
-ZEND_API void php_sxe_move_forward_iterator(php_sxe_object *sxe TSRMLS_DC) /* 
{{{ */
+PHP_SXE_API void php_sxe_move_forward_iterator(php_sxe_object *sxe TSRMLS_DC) 
/* {{{ */
 {
xmlNodePtr  node = NULL;
php_sxe_object  *intern;
@@ -2634,7 +2634,7 @@
 {
php_info_print_table_start();
php_info_print_table_header(2, Simplexml support, enabled);
-   php_info_print_table_row(2, Revision, $Revision: 1.269 $);
+   php_info_print_table_row(2, Revision, $Revision: 1.270 $);
php_info_print_table_row(2, Schema support,
 #ifdef LIBXML_SCHEMAS_ENABLED
enabled);



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/simplexml php_simplexml.h php_simplexml_exports.h simplexml.c

2008-12-26 Thread Rob Richards
rrichards   Fri Dec 26 20:28:44 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/simplexml  php_simplexml.h php_simplexml_exports.h 
simplexml.c 
  Log:
  MFH: properly export functions
  
http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/php_simplexml.h?r1=1.20.2.2.2.3.2.3r2=1.20.2.2.2.3.2.4diff_format=u
Index: php-src/ext/simplexml/php_simplexml.h
diff -u php-src/ext/simplexml/php_simplexml.h:1.20.2.2.2.3.2.3 
php-src/ext/simplexml/php_simplexml.h:1.20.2.2.2.3.2.4
--- php-src/ext/simplexml/php_simplexml.h:1.20.2.2.2.3.2.3  Wed Jul  9 
21:27:28 2008
+++ php-src/ext/simplexml/php_simplexml.h   Fri Dec 26 20:28:43 2008
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_simplexml.h,v 1.20.2.2.2.3.2.3 2008/07/09 21:27:28 colder Exp $ */
+/* $Id: php_simplexml.h,v 1.20.2.2.2.3.2.4 2008/12/26 20:28:43 rrichards Exp $ 
*/
 
 #ifndef PHP_SIMPLEXML_H
 #define PHP_SIMPLEXML_H
@@ -77,7 +77,19 @@
 #define SIMPLEXML_G(v) (simplexml_globals.v)
 #endif
 
-ZEND_API zend_class_entry *sxe_get_element_class_entry();
+#ifdef PHP_WIN32
+#ifdef SIMPLEXML_EXPORTS
+#define PHP_SXE_API __declspec(dllexport)
+#else
+#define PHP_SXE_API __declspec(dllimport)
+#endif /* SIMPLEXML_EXPORTS */
+#elif defined(__GNUC__)  __GNUC__ = 4
+#define PHP_SXE_API __attribute__ ((visibility(default)))
+#else
+#define PHP_SXE_API
+#endif /* PHP_WIN32 */
+
+PHP_SXE_API zend_class_entry *sxe_get_element_class_entry();
 
 #endif
 
http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/php_simplexml_exports.h?r1=1.3.2.3.2.1.2.1r2=1.3.2.3.2.1.2.2diff_format=u
Index: php-src/ext/simplexml/php_simplexml_exports.h
diff -u php-src/ext/simplexml/php_simplexml_exports.h:1.3.2.3.2.1.2.1 
php-src/ext/simplexml/php_simplexml_exports.h:1.3.2.3.2.1.2.2
--- php-src/ext/simplexml/php_simplexml_exports.h:1.3.2.3.2.1.2.1   Mon Dec 
31 07:17:13 2007
+++ php-src/ext/simplexml/php_simplexml_exports.h   Fri Dec 26 20:28:43 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: php_simplexml_exports.h,v 1.3.2.3.2.1.2.1 2007/12/31 07:17:13 
sebastian Exp $ */
+/* $Id: php_simplexml_exports.h,v 1.3.2.3.2.1.2.2 2008/12/26 20:28:43 
rrichards Exp $ */
 
 #ifndef PHP_SIMPLEXML_EXPORTS_H
 #define PHP_SIMPLEXML_EXPORTS_H
@@ -39,7 +39,7 @@
} \
 }
 
-ZEND_API zend_object_value sxe_object_new(zend_class_entry *ce TSRMLS_DC);
+PHP_SXE_API zend_object_value sxe_object_new(zend_class_entry *ce TSRMLS_DC);
 /* {{{ php_sxe_fetch_object()
  */
 static inline php_sxe_object *
http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/simplexml.c?r1=1.151.2.22.2.35.2.28r2=1.151.2.22.2.35.2.29diff_format=u
Index: php-src/ext/simplexml/simplexml.c
diff -u php-src/ext/simplexml/simplexml.c:1.151.2.22.2.35.2.28 
php-src/ext/simplexml/simplexml.c:1.151.2.22.2.35.2.29
--- php-src/ext/simplexml/simplexml.c:1.151.2.22.2.35.2.28  Wed Nov 19 
02:00:53 2008
+++ php-src/ext/simplexml/simplexml.c   Fri Dec 26 20:28:43 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: simplexml.c,v 1.151.2.22.2.35.2.28 2008/11/19 02:00:53 colder Exp $ */
+/* $Id: simplexml.c,v 1.151.2.22.2.35.2.29 2008/12/26 20:28:43 rrichards Exp $ 
*/
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -40,7 +40,7 @@
 
 zend_class_entry *sxe_class_entry = NULL;
 
-ZEND_API zend_class_entry *sxe_get_element_class_entry() /* {{{ */
+PHP_SXE_API zend_class_entry *sxe_get_element_class_entry() /* {{{ */
 {
return sxe_class_entry;
 }
@@ -2082,7 +2082,7 @@
 
 /* {{{ sxe_object_new()
  */
-ZEND_API zend_object_value
+PHP_SXE_API zend_object_value
 sxe_object_new(zend_class_entry *ce TSRMLS_DC)
 {
php_sxe_object*intern;
@@ -2344,7 +2344,7 @@
 }
 /* }}} */
 
-ZEND_API void php_sxe_move_forward_iterator(php_sxe_object *sxe TSRMLS_DC) /* 
{{{ */
+PHP_SXE_API void php_sxe_move_forward_iterator(php_sxe_object *sxe TSRMLS_DC) 
/* {{{ */
 {
xmlNodePtr  node = NULL;
php_sxe_object  *intern;
@@ -2555,7 +2555,7 @@
 {
php_info_print_table_start();
php_info_print_table_header(2, Simplexml support, enabled);
-   php_info_print_table_row(2, Revision, $Revision: 
1.151.2.22.2.35.2.28 $);
+   php_info_print_table_row(2, Revision, $Revision: 
1.151.2.22.2.35.2.29 $);
php_info_print_table_row(2, Schema support,
 #ifdef LIBXML_SCHEMAS_ENABLED
enabled);



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/simplexml php_simplexml.h

2008-12-26 Thread Rob Richards
rrichards   Sat Dec 27 01:07:18 2008 UTC

  Modified files:  
/php-src/ext/simplexml  php_simplexml.h 
  Log:
  force export on win32 to workaround win32 conig issues
  
http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/php_simplexml.h?r1=1.31r2=1.32diff_format=u
Index: php-src/ext/simplexml/php_simplexml.h
diff -u php-src/ext/simplexml/php_simplexml.h:1.31 
php-src/ext/simplexml/php_simplexml.h:1.32
--- php-src/ext/simplexml/php_simplexml.h:1.31  Fri Dec 26 20:27:14 2008
+++ php-src/ext/simplexml/php_simplexml.h   Sat Dec 27 01:07:18 2008
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_simplexml.h,v 1.31 2008/12/26 20:27:14 rrichards Exp $ */
+/* $Id: php_simplexml.h,v 1.32 2008/12/27 01:07:18 rrichards Exp $ */
 
 #ifndef PHP_SIMPLEXML_H
 #define PHP_SIMPLEXML_H
@@ -77,17 +77,7 @@
 #define SIMPLEXML_G(v) (simplexml_globals.v)
 #endif
 
-#ifdef PHP_WIN32
-#ifdef SIMPLEXML_EXPORTS
-#define PHP_SXE_API __declspec(dllexport)
-#else
-#define PHP_SXE_API __declspec(dllimport)
-#endif /* SIMPLEXML_EXPORTS */
-#elif defined(__GNUC__)  __GNUC__ = 4
-#define PHP_SXE_API __attribute__ ((visibility(default)))
-#else
-#define PHP_SXE_API
-#endif /* PHP_WIN32 */
+#define PHP_SXE_API ZEND_DLEXPORT
 
 PHP_SXE_API zend_class_entry *sxe_get_element_class_entry(TSRMLS_D);
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/simplexml php_simplexml.h

2008-12-26 Thread Rob Richards
rrichards   Sat Dec 27 01:07:49 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/simplexml  php_simplexml.h 
  Log:
  MFH: force export on win32 to workaround win32 conig issues
  
http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/php_simplexml.h?r1=1.20.2.2.2.3.2.4r2=1.20.2.2.2.3.2.5diff_format=u
Index: php-src/ext/simplexml/php_simplexml.h
diff -u php-src/ext/simplexml/php_simplexml.h:1.20.2.2.2.3.2.4 
php-src/ext/simplexml/php_simplexml.h:1.20.2.2.2.3.2.5
--- php-src/ext/simplexml/php_simplexml.h:1.20.2.2.2.3.2.4  Fri Dec 26 
20:28:43 2008
+++ php-src/ext/simplexml/php_simplexml.h   Sat Dec 27 01:07:49 2008
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_simplexml.h,v 1.20.2.2.2.3.2.4 2008/12/26 20:28:43 rrichards Exp $ 
*/
+/* $Id: php_simplexml.h,v 1.20.2.2.2.3.2.5 2008/12/27 01:07:49 rrichards Exp $ 
*/
 
 #ifndef PHP_SIMPLEXML_H
 #define PHP_SIMPLEXML_H
@@ -77,17 +77,7 @@
 #define SIMPLEXML_G(v) (simplexml_globals.v)
 #endif
 
-#ifdef PHP_WIN32
-#ifdef SIMPLEXML_EXPORTS
-#define PHP_SXE_API __declspec(dllexport)
-#else
-#define PHP_SXE_API __declspec(dllimport)
-#endif /* SIMPLEXML_EXPORTS */
-#elif defined(__GNUC__)  __GNUC__ = 4
-#define PHP_SXE_API __attribute__ ((visibility(default)))
-#else
-#define PHP_SXE_API
-#endif /* PHP_WIN32 */
+#define PHP_SXE_API ZEND_DLEXPORT
 
 PHP_SXE_API zend_class_entry *sxe_get_element_class_entry();
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/dom php_dom.c /ext/dom/tests bug46849.phpt

2008-12-16 Thread Rob Richards
rrichards   Tue Dec 16 12:53:29 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/dom/tests  bug46849.phpt 

  Modified files:  
/php-src/ext/domphp_dom.c 
  Log:
  MFH: fix bug #46849 (Cloning DOMDocument doesn't clone the properties)
  fix some warnings
  add test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/php_dom.c?r1=1.73.2.12.2.12.2.12r2=1.73.2.12.2.12.2.13diff_format=u
Index: php-src/ext/dom/php_dom.c
diff -u php-src/ext/dom/php_dom.c:1.73.2.12.2.12.2.12 
php-src/ext/dom/php_dom.c:1.73.2.12.2.12.2.13
--- php-src/ext/dom/php_dom.c:1.73.2.12.2.12.2.12   Mon Nov 17 11:27:54 2008
+++ php-src/ext/dom/php_dom.c   Tue Dec 16 12:53:29 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: php_dom.c,v 1.73.2.12.2.12.2.12 2008/11/17 11:27:54 felipe Exp $ */
+/* $Id: php_dom.c,v 1.73.2.12.2.12.2.13 2008/12/16 12:53:29 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -172,6 +172,31 @@
}
 }
 
+static void dom_copy_doc_props(php_libxml_ref_obj *source_doc, 
php_libxml_ref_obj *dest_doc)
+{
+   dom_doc_propsptr source, dest;
+   
+   if (source_doc  dest_doc) {
+   
+   source = dom_get_doc_props(source_doc);
+   dest = dom_get_doc_props(dest_doc);
+
+   dest-formatoutput = source-formatoutput;
+   dest-validateonparse = source-validateonparse;
+   dest-resolveexternals = source-resolveexternals;
+   dest-preservewhitespace = source-preservewhitespace;
+   dest-substituteentities = source-substituteentities;
+   dest-stricterror = source-stricterror;
+   dest-recover = source-recover;
+   if (source-classmap) {
+   ALLOC_HASHTABLE(dest-classmap);
+   zend_hash_init(dest-classmap, 0, NULL, NULL, 0);
+   zend_hash_copy(dest-classmap, source-classmap, NULL, 
NULL, sizeof(zend_class_entry *));
+   }
+
+   }
+}
+
 int dom_set_doc_classmap(php_libxml_ref_obj *document, zend_class_entry 
*basece, zend_class_entry *ce TSRMLS_DC)
 {
dom_doc_propsptr doc_props;
@@ -1078,6 +1103,9 @@
}

php_libxml_increment_doc_ref((php_libxml_node_object *)clone, cloned_node-doc 
TSRMLS_CC);

php_libxml_increment_node_ptr((php_libxml_node_object *)clone, cloned_node, 
(void *)clone TSRMLS_CC);
+   if (intern-document != clone-document) {
+   dom_copy_doc_props(intern-document, 
clone-document);
+   }
}
 
}
@@ -1371,8 +1399,8 @@
 
while (nodep != NULL  (*cur = index || index == -1)) {
if (nodep-type == XML_ELEMENT_NODE) {
-   if (xmlStrEqual(nodep-name, local) || xmlStrEqual(*, 
local)) {
-   if (ns == NULL || (nodep-ns != NULL  
(xmlStrEqual(nodep-ns-href, ns) || xmlStrEqual(*, ns {
+   if (xmlStrEqual(nodep-name, (xmlChar *)local) || 
xmlStrEqual((xmlChar *)*, (xmlChar *)local)) {
+   if (ns == NULL || (nodep-ns != NULL  
(xmlStrEqual(nodep-ns-href, (xmlChar *)ns) || xmlStrEqual((xmlChar *)*, 
(xmlChar *)ns {
if (*cur == index) {
ret = nodep;
break;
@@ -1479,9 +1507,9 @@
return NAMESPACE_ERR;
}

-   *localname = xmlSplitQName2(qname, (xmlChar **) prefix);
+   *localname = (char *)xmlSplitQName2((xmlChar *)qname, (xmlChar **) 
prefix);
if (*localname == NULL) {
-   *localname = xmlStrdup(qname);
+   *localname = (char *)xmlStrdup((xmlChar *)qname);
if (*prefix == NULL  uri_len == 0) {
return 0;
}
@@ -1517,10 +1545,10 @@
 
*errorcode = 0;
 
-   if (! ((prefix  !strcmp (prefix, xml  )  strcmp(uri, 
XML_XML_NAMESPACE)) ||
-  (prefix  !strcmp (prefix, xmlns)  strcmp(uri, 
DOM_XMLNS_NAMESPACE)) ||
-  (prefix  !strcmp(uri, DOM_XMLNS_NAMESPACE)  strcmp 
(prefix, xmlns {
-   nsptr = xmlNewNs(nodep, uri, prefix);
+   if (! ((prefix  !strcmp (prefix, xml)  strcmp(uri, (char 
*)XML_XML_NAMESPACE)) ||
+  (prefix  !strcmp (prefix, xmlns)  strcmp(uri, (char 
*)DOM_XMLNS_NAMESPACE)) ||
+  (prefix  !strcmp(uri, (char *)DOM_XMLNS_NAMESPACE)  
strcmp (prefix, xmlns {
+   nsptr = xmlNewNs(nodep, (xmlChar *)uri, (xmlChar *)prefix);
}
 
if (nsptr == NULL) {
@@ -1539,7 +1567,7 @@
if (node == NULL)
return NULL;
 
-   if 

[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS

2008-12-16 Thread Rob Richards
rrichards   Tue Dec 16 12:54:05 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
  Log:
  BFN
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.415r2=1.2027.2.547.2.965.2.416diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.415 
php-src/NEWS:1.2027.2.547.2.965.2.416
--- php-src/NEWS:1.2027.2.547.2.965.2.415   Sat Dec 13 05:31:15 2008
+++ php-src/NEWSTue Dec 16 12:54:05 2008
@@ -7,6 +7,7 @@
 - Deprecated session_register(), session_unregister() and
   session_is_registered(). (Hannes)
 
+- Fixed bug #46849 (Cloning DOMDocument doesn't clone the properties). (Rob)
 - Fixed bug #46847 (phpinfo() is missing some settings). (Hannes)
 - Fixed bug #46811 (ini_set() doesn't return false on failure). (Hannes)
 - Fixed bug #46746 (xmlrpc_decode_request outputs non-suppressable error when



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/dom php_dom.c /ext/dom/tests bug46849.phpt

2008-12-16 Thread Rob Richards
rrichards   Tue Dec 16 12:51:58 2008 UTC

  Added files: 
/php-src/ext/dom/tests  bug46849.phpt 

  Modified files:  
/php-src/ext/domphp_dom.c 
  Log:
  fix bug #46849 (Cloning DOMDocument doesn't clone the properties)
  fix some warnings
  add test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/php_dom.c?r1=1.115r2=1.116diff_format=u
Index: php-src/ext/dom/php_dom.c
diff -u php-src/ext/dom/php_dom.c:1.115 php-src/ext/dom/php_dom.c:1.116
--- php-src/ext/dom/php_dom.c:1.115 Mon Nov 17 11:26:20 2008
+++ php-src/ext/dom/php_dom.c   Tue Dec 16 12:51:58 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: php_dom.c,v 1.115 2008/11/17 11:26:20 felipe Exp $ */
+/* $Id: php_dom.c,v 1.116 2008/12/16 12:51:58 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -147,6 +147,31 @@
}
 }
 
+static void dom_copy_doc_props(php_libxml_ref_obj *source_doc, 
php_libxml_ref_obj *dest_doc)
+{
+   dom_doc_propsptr source, dest;
+   
+   if (source_doc  dest_doc) {
+   
+   source = dom_get_doc_props(source_doc);
+   dest = dom_get_doc_props(dest_doc);
+
+   dest-formatoutput = source-formatoutput;
+   dest-validateonparse = source-validateonparse;
+   dest-resolveexternals = source-resolveexternals;
+   dest-preservewhitespace = source-preservewhitespace;
+   dest-substituteentities = source-substituteentities;
+   dest-stricterror = source-stricterror;
+   dest-recover = source-recover;
+   if (source-classmap) {
+   ALLOC_HASHTABLE(dest-classmap);
+   zend_u_hash_init(dest-classmap, 0, NULL, NULL, 0, 
UG(unicode));
+   zend_hash_copy(dest-classmap, source-classmap, NULL, 
NULL, sizeof(zend_class_entry *));
+   }
+
+   }
+}
+
 int dom_set_doc_classmap(php_libxml_ref_obj *document, zend_class_entry 
*basece, zend_class_entry *ce TSRMLS_DC)
 {
dom_doc_propsptr doc_props;
@@ -1068,6 +1093,9 @@
}

php_libxml_increment_doc_ref((php_libxml_node_object *)clone, cloned_node-doc 
TSRMLS_CC);

php_libxml_increment_node_ptr((php_libxml_node_object *)clone, cloned_node, 
(void *)clone TSRMLS_CC);
+   if (intern-document != clone-document) {
+   dom_copy_doc_props(intern-document, 
clone-document);
+   }
}
 
}
@@ -1363,8 +1391,8 @@
 
while (nodep != NULL  (*cur = index || index == -1)) {
if (nodep-type == XML_ELEMENT_NODE) {
-   if (xmlStrEqual(nodep-name, local) || xmlStrEqual(*, 
local)) {
-   if (ns == NULL || (nodep-ns != NULL  
(xmlStrEqual(nodep-ns-href, ns) || xmlStrEqual(*, ns {
+   if (xmlStrEqual(nodep-name, (xmlChar *)local) || 
xmlStrEqual((xmlChar *)*, (xmlChar *)local)) {
+   if (ns == NULL || (nodep-ns != NULL  
(xmlStrEqual(nodep-ns-href, (xmlChar *)ns) || xmlStrEqual((xmlChar *)*, 
(xmlChar *)ns {
if (*cur == index) {
ret = nodep;
break;
@@ -1469,9 +1497,9 @@
return NAMESPACE_ERR;
}

-   *localname = xmlSplitQName2(qname, (xmlChar **) prefix);
+   *localname = (char *)xmlSplitQName2((xmlChar *)qname, (xmlChar **) 
prefix);
if (*localname == NULL) {
-   *localname = xmlStrdup(qname);
+   *localname = (char *)xmlStrdup(qname);
if (*prefix == NULL  uri_len == 0) {
return 0;
}
@@ -1507,10 +1535,10 @@
 
*errorcode = 0;
 
-   if (! ((prefix  !strcmp (prefix, xml  )  strcmp(uri, 
XML_XML_NAMESPACE)) ||
-  (prefix  !strcmp (prefix, xmlns)  strcmp(uri, 
DOM_XMLNS_NAMESPACE)) ||
-  (prefix  !strcmp(uri, DOM_XMLNS_NAMESPACE)  strcmp 
(prefix, xmlns {
-   nsptr = xmlNewNs(nodep, uri, prefix);
+   if (! ((prefix  !strcmp (prefix, xml)  strcmp(uri, (char 
*)XML_XML_NAMESPACE)) ||
+  (prefix  !strcmp (prefix, xmlns)  strcmp(uri, (char 
*)DOM_XMLNS_NAMESPACE)) ||
+  (prefix  !strcmp(uri, (char *)DOM_XMLNS_NAMESPACE)  
strcmp (prefix, xmlns {
+   nsptr = xmlNewNs(nodep, (xmlChar *)uri, (xmlChar *)prefix);
}
 
if (nsptr == NULL) {
@@ -1529,7 +1557,7 @@
if (node == NULL)
return NULL;
 
-   if (localName == NULL || xmlStrEqual(localName, )) {
+   if (localName == NULL || xmlStrEqual(localName, (xmlChar *))) {
  

[PHP-CVS] cvs: php-src /ext/xml compat.c /ext/xml/tests bug46699.phpt

2008-12-11 Thread Rob Richards
rrichards   Fri Dec 12 04:15:14 2008 UTC

  Added files: 
/php-src/ext/xml/tests  bug46699.phpt 

  Modified files:  
/php-src/ext/xmlcompat.c 
  Log:
  fix bug #46699: (xml_parse crash when parser is namespace aware)
  fix a couple warnings
  add test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xml/compat.c?r1=1.50r2=1.51diff_format=u
Index: php-src/ext/xml/compat.c
diff -u php-src/ext/xml/compat.c:1.50 php-src/ext/xml/compat.c:1.51
--- php-src/ext/xml/compat.c:1.50   Mon Dec 31 07:12:17 2007
+++ php-src/ext/xml/compat.cFri Dec 12 04:15:14 2008
@@ -40,7 +40,7 @@
/* Use libxml functions otherwise its memory 
deallocation is screwed up */
*qualified = xmlStrdup(URI);
*qualified = xmlStrncat(*qualified, 
parser-_ns_seperator, 1);
-   *qualified = xmlStrncat(*qualified, name, strlen(name));
+   *qualified = xmlStrncat(*qualified, name, 
xmlStrlen(name));
} else {
*qualified = xmlStrdup(name);
}
@@ -104,7 +104,66 @@
y = 0;
}

-   if (parser-h_start_element == NULL  parser-h_default == NULL) {
+   if (parser-h_start_element == NULL) {
+   if (parser-h_default) {
+
+   if (prefix) {
+   qualified_name = xmlStrncatNew((xmlChar *), 
prefix, xmlStrlen(prefix));
+   qualified_name = xmlStrncat(qualified_name, 
(xmlChar *):, 1);
+   qualified_name = xmlStrncat(qualified_name, 
name, xmlStrlen(name));
+   } else {
+   qualified_name = xmlStrncatNew((xmlChar *), 
name, xmlStrlen(name));
+   }
+   
+   if (namespaces) {
+   int i, j;
+   for (i = 0,j = 0;j  nb_namespaces;j++) {
+   int ns_len;
+   char *ns_string, *ns_prefix, *ns_url;
+   
+   ns_prefix = (char *) namespaces[i++];
+   ns_url = (char *) namespaces[i++];
+   
+   if (ns_prefix) {
+   ns_len = spprintf(ns_string, 
0,  xmlns:%s=\%s\, ns_prefix, ns_url);
+   } else {
+   ns_len = spprintf(ns_string, 
0,  xmlns=\%s\, ns_url);
+   }
+   qualified_name = 
xmlStrncat(qualified_name, (xmlChar *)ns_string, ns_len);
+   
+   efree(ns_string);
+   }
+   }
+   
+   if (attributes) {
+   for (i = 0; i  nb_attributes; i += 1) {
+   int att_len;
+   char *att_string, *att_name, 
*att_value, *att_prefix, *att_valueend;
+
+   att_name = (char *) attributes[y++];
+   att_prefix = (char *)attributes[y++];
+   y++;
+   att_value = (char *)attributes[y++];
+   att_valueend = (char *)attributes[y++];
+
+   if (att_prefix) {
+   att_len = spprintf(att_string, 
0,  %s:%s=\, att_prefix, att_name);
+   } else {
+   att_len = spprintf(att_string, 
0,  %s=\, att_name);
+   }
+
+   qualified_name = 
xmlStrncat(qualified_name, (xmlChar *)att_string, att_len);
+   qualified_name = 
xmlStrncat(qualified_name, (xmlChar *)att_value, att_valueend - att_value);
+   qualified_name = 
xmlStrncat(qualified_name, (xmlChar *)\, 1);
+   
+   efree(att_string);
+   }
+
+   }
+   qualified_name = xmlStrncat(qualified_name, (xmlChar 
*), 1);
+   parser-h_default(parser-user, (const XML_Char *) 
qualified_name, xmlStrlen(qualified_name));
+   xmlFree(qualified_name);
+   }
return;
}
_qualify_namespace(parser, name, URI, qualified_name);
@@ -178,6 +237,18 @@
XML_Parser  parser = 

[PHP-CVS] cvs: php-src(PHP_5_3) /ext/xml compat.c /ext/xml/tests bug46699.phpt

2008-12-11 Thread Rob Richards
rrichards   Fri Dec 12 04:16:21 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/xml/tests  bug46699.phpt 

  Modified files:  
/php-src/ext/xmlcompat.c 
  Log:
  MFH: fix bug #46699: (xml_parse crash when parser is namespace aware)
  fix a couple warnings
  add test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xml/compat.c?r1=1.44.2.4.2.1.2.1r2=1.44.2.4.2.1.2.2diff_format=u
Index: php-src/ext/xml/compat.c
diff -u php-src/ext/xml/compat.c:1.44.2.4.2.1.2.1 
php-src/ext/xml/compat.c:1.44.2.4.2.1.2.2
--- php-src/ext/xml/compat.c:1.44.2.4.2.1.2.1   Mon Dec 31 07:17:16 2007
+++ php-src/ext/xml/compat.cFri Dec 12 04:16:21 2008
@@ -40,7 +40,7 @@
/* Use libxml functions otherwise its memory 
deallocation is screwed up */
*qualified = xmlStrdup(URI);
*qualified = xmlStrncat(*qualified, 
parser-_ns_seperator, 1);
-   *qualified = xmlStrncat(*qualified, name, strlen(name));
+   *qualified = xmlStrncat(*qualified, name, 
xmlStrlen(name));
} else {
*qualified = xmlStrdup(name);
}
@@ -104,7 +104,66 @@
y = 0;
}

-   if (parser-h_start_element == NULL  parser-h_default == NULL) {
+   if (parser-h_start_element == NULL) {
+   if (parser-h_default) {
+
+   if (prefix) {
+   qualified_name = xmlStrncatNew((xmlChar *), 
prefix, xmlStrlen(prefix));
+   qualified_name = xmlStrncat(qualified_name, 
(xmlChar *):, 1);
+   qualified_name = xmlStrncat(qualified_name, 
name, xmlStrlen(name));
+   } else {
+   qualified_name = xmlStrncatNew((xmlChar *), 
name, xmlStrlen(name));
+   }
+   
+   if (namespaces) {
+   int i, j;
+   for (i = 0,j = 0;j  nb_namespaces;j++) {
+   int ns_len;
+   char *ns_string, *ns_prefix, *ns_url;
+   
+   ns_prefix = (char *) namespaces[i++];
+   ns_url = (char *) namespaces[i++];
+   
+   if (ns_prefix) {
+   ns_len = spprintf(ns_string, 
0,  xmlns:%s=\%s\, ns_prefix, ns_url);
+   } else {
+   ns_len = spprintf(ns_string, 
0,  xmlns=\%s\, ns_url);
+   }
+   qualified_name = 
xmlStrncat(qualified_name, (xmlChar *)ns_string, ns_len);
+   
+   efree(ns_string);
+   }
+   }
+   
+   if (attributes) {
+   for (i = 0; i  nb_attributes; i += 1) {
+   int att_len;
+   char *att_string, *att_name, 
*att_value, *att_prefix, *att_valueend;
+
+   att_name = (char *) attributes[y++];
+   att_prefix = (char *)attributes[y++];
+   y++;
+   att_value = (char *)attributes[y++];
+   att_valueend = (char *)attributes[y++];
+
+   if (att_prefix) {
+   att_len = spprintf(att_string, 
0,  %s:%s=\, att_prefix, att_name);
+   } else {
+   att_len = spprintf(att_string, 
0,  %s=\, att_name);
+   }
+
+   qualified_name = 
xmlStrncat(qualified_name, (xmlChar *)att_string, att_len);
+   qualified_name = 
xmlStrncat(qualified_name, (xmlChar *)att_value, att_valueend - att_value);
+   qualified_name = 
xmlStrncat(qualified_name, (xmlChar *)\, 1);
+   
+   efree(att_string);
+   }
+
+   }
+   qualified_name = xmlStrncat(qualified_name, (xmlChar 
*), 1);
+   parser-h_default(parser-user, (const XML_Char *) 
qualified_name, xmlStrlen(qualified_name));
+   xmlFree(qualified_name);
+   }
return;
}
_qualify_namespace(parser, name, 

[PHP-CVS] cvs: php-src(PHP_5_2) /ext/xml compat.c /ext/xml/tests bug46699.phpt

2008-12-11 Thread Rob Richards
rrichards   Fri Dec 12 04:17:26 2008 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/xml/tests  bug46699.phpt 

  Modified files:  
/php-src/ext/xmlcompat.c 
  Log:
  MFH: fix bug #46699: (xml_parse crash when parser is namespace aware)
  fix a couple warnings
  add test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xml/compat.c?r1=1.44.2.4.2.2r2=1.44.2.4.2.3diff_format=u
Index: php-src/ext/xml/compat.c
diff -u php-src/ext/xml/compat.c:1.44.2.4.2.2 
php-src/ext/xml/compat.c:1.44.2.4.2.3
--- php-src/ext/xml/compat.c:1.44.2.4.2.2   Mon Dec 31 07:20:14 2007
+++ php-src/ext/xml/compat.cFri Dec 12 04:17:26 2008
@@ -40,7 +40,7 @@
/* Use libxml functions otherwise its memory 
deallocation is screwed up */
*qualified = xmlStrdup(URI);
*qualified = xmlStrncat(*qualified, 
parser-_ns_seperator, 1);
-   *qualified = xmlStrncat(*qualified, name, strlen(name));
+   *qualified = xmlStrncat(*qualified, name, 
xmlStrlen(name));
} else {
*qualified = xmlStrdup(name);
}
@@ -104,7 +104,66 @@
y = 0;
}

-   if (parser-h_start_element == NULL  parser-h_default == NULL) {
+   if (parser-h_start_element == NULL) {
+   if (parser-h_default) {
+
+   if (prefix) {
+   qualified_name = xmlStrncatNew((xmlChar *), 
prefix, xmlStrlen(prefix));
+   qualified_name = xmlStrncat(qualified_name, 
(xmlChar *):, 1);
+   qualified_name = xmlStrncat(qualified_name, 
name, xmlStrlen(name));
+   } else {
+   qualified_name = xmlStrncatNew((xmlChar *), 
name, xmlStrlen(name));
+   }
+   
+   if (namespaces) {
+   int i, j;
+   for (i = 0,j = 0;j  nb_namespaces;j++) {
+   int ns_len;
+   char *ns_string, *ns_prefix, *ns_url;
+   
+   ns_prefix = (char *) namespaces[i++];
+   ns_url = (char *) namespaces[i++];
+   
+   if (ns_prefix) {
+   ns_len = spprintf(ns_string, 
0,  xmlns:%s=\%s\, ns_prefix, ns_url);
+   } else {
+   ns_len = spprintf(ns_string, 
0,  xmlns=\%s\, ns_url);
+   }
+   qualified_name = 
xmlStrncat(qualified_name, (xmlChar *)ns_string, ns_len);
+   
+   efree(ns_string);
+   }
+   }
+   
+   if (attributes) {
+   for (i = 0; i  nb_attributes; i += 1) {
+   int att_len;
+   char *att_string, *att_name, 
*att_value, *att_prefix, *att_valueend;
+
+   att_name = (char *) attributes[y++];
+   att_prefix = (char *)attributes[y++];
+   y++;
+   att_value = (char *)attributes[y++];
+   att_valueend = (char *)attributes[y++];
+
+   if (att_prefix) {
+   att_len = spprintf(att_string, 
0,  %s:%s=\, att_prefix, att_name);
+   } else {
+   att_len = spprintf(att_string, 
0,  %s=\, att_name);
+   }
+
+   qualified_name = 
xmlStrncat(qualified_name, (xmlChar *)att_string, att_len);
+   qualified_name = 
xmlStrncat(qualified_name, (xmlChar *)att_value, att_valueend - att_value);
+   qualified_name = 
xmlStrncat(qualified_name, (xmlChar *)\, 1);
+   
+   efree(att_string);
+   }
+
+   }
+   qualified_name = xmlStrncat(qualified_name, (xmlChar 
*), 1);
+   parser-h_default(parser-user, (const XML_Char *) 
qualified_name, xmlStrlen(qualified_name));
+   xmlFree(qualified_name);
+   }
return;
}
_qualify_namespace(parser, name, URI, 

[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS

2008-12-11 Thread Rob Richards
rrichards   Fri Dec 12 04:18:13 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  BFN
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1357r2=1.2027.2.547.2.1358diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1357 php-src/NEWS:1.2027.2.547.2.1358
--- php-src/NEWS:1.2027.2.547.2.1357Thu Dec 11 01:23:40 2008
+++ php-src/NEWSFri Dec 12 04:18:12 2008
@@ -10,6 +10,7 @@
 - Fixed bug #46748 (Segfault when an SSL error has more than one error). 
(Scott)
 - Fixed bug #46739 (array returned by curl_getinfo should contain content_type 
key). 
   (Mikko)
+- Fixed bug #46699: (xml_parse crash when parser is namespace aware). (Rob)
 - Fixed bug #35975 (Session cookie expires date format isn't the most 
compatible.
   Now matches that of setcookie()). (Scott)
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS

2008-12-11 Thread Rob Richards
rrichards   Fri Dec 12 04:21:02 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  fix entry
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1358r2=1.2027.2.547.2.1359diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1358 php-src/NEWS:1.2027.2.547.2.1359
--- php-src/NEWS:1.2027.2.547.2.1358Fri Dec 12 04:18:12 2008
+++ php-src/NEWSFri Dec 12 04:21:01 2008
@@ -10,7 +10,7 @@
 - Fixed bug #46748 (Segfault when an SSL error has more than one error). 
(Scott)
 - Fixed bug #46739 (array returned by curl_getinfo should contain content_type 
key). 
   (Mikko)
-- Fixed bug #46699: (xml_parse crash when parser is namespace aware). (Rob)
+- Fixed bug #46699 (xml_parse crash when parser is namespace aware). (Rob)
 - Fixed bug #35975 (Session cookie expires date format isn't the most 
compatible.
   Now matches that of setcookie()). (Scott)
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/xsl xsltprocessor.c

2008-12-05 Thread Rob Richards
rrichards   Fri Dec  5 18:34:54 2008 UTC

  Modified files:  
/php-src/ext/xslxsltprocessor.c 
  Log:
  fix arginfo - these also accept SimpleXMLElement
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xsl/xsltprocessor.c?r1=1.70r2=1.71diff_format=u
Index: php-src/ext/xsl/xsltprocessor.c
diff -u php-src/ext/xsl/xsltprocessor.c:1.70 
php-src/ext/xsl/xsltprocessor.c:1.71
--- php-src/ext/xsl/xsltprocessor.c:1.70Thu Nov 27 19:02:45 2008
+++ php-src/ext/xsl/xsltprocessor.c Fri Dec  5 18:34:54 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: xsltprocessor.c,v 1.70 2008/11/27 19:02:45 dmitry Exp $ */
+/* $Id: xsltprocessor.c,v 1.71 2008/12/05 18:34:54 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -29,20 +29,20 @@
 
 /* {{{ arginfo */
 ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_import_stylesheet, 0, 0, 1)
-   ZEND_ARG_OBJ_INFO(0, doc, DOMDocument, 0)
+   ZEND_ARG_INFO(0, doc)
 ZEND_END_ARG_INFO();
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_transform_to_doc, 0, 0, 1)
-   ZEND_ARG_OBJ_INFO(0, doc, DOMNode, 0)
+   ZEND_ARG_INFO(0, doc)
 ZEND_END_ARG_INFO();
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_transform_to_uri, 0, 0, 2)
-   ZEND_ARG_OBJ_INFO(0, doc, DOMDocument, 0)
+   ZEND_ARG_INFO(0, doc)
ZEND_ARG_INFO(0, uri)
 ZEND_END_ARG_INFO();
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_transform_to_xml, 0, 0, 1)
-   ZEND_ARG_OBJ_INFO(0, doc, DOMDocument, 0)
+   ZEND_ARG_INFO(0, doc)
 ZEND_END_ARG_INFO();
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_set_parameter, 0, 0, 2)



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/xsl xsltprocessor.c

2008-12-05 Thread Rob Richards
rrichards   Fri Dec  5 18:35:43 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/xslxsltprocessor.c 
  Log:
  MFH: fix arginfo - these also accept SimpleXMLElement
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xsl/xsltprocessor.c?r1=1.39.2.2.2.9.2.13r2=1.39.2.2.2.9.2.14diff_format=u
Index: php-src/ext/xsl/xsltprocessor.c
diff -u php-src/ext/xsl/xsltprocessor.c:1.39.2.2.2.9.2.13 
php-src/ext/xsl/xsltprocessor.c:1.39.2.2.2.9.2.14
--- php-src/ext/xsl/xsltprocessor.c:1.39.2.2.2.9.2.13   Thu Nov 27 19:01:23 2008
+++ php-src/ext/xsl/xsltprocessor.c Fri Dec  5 18:35:43 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: xsltprocessor.c,v 1.39.2.2.2.9.2.13 2008/11/27 19:01:23 dmitry Exp $ */
+/* $Id: xsltprocessor.c,v 1.39.2.2.2.9.2.14 2008/12/05 18:35:43 rrichards Exp 
$ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -29,20 +29,20 @@
 
 /* {{{ arginfo */
 ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_import_stylesheet, 0, 0, 1)
-   ZEND_ARG_OBJ_INFO(0, doc, DOMDocument, 0)
+   ZEND_ARG_INFO(0, doc)
 ZEND_END_ARG_INFO();
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_transform_to_doc, 0, 0, 1)
-   ZEND_ARG_OBJ_INFO(0, doc, DOMNode, 0)
+   ZEND_ARG_INFO(0, doc)
 ZEND_END_ARG_INFO();
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_transform_to_uri, 0, 0, 2)
-   ZEND_ARG_OBJ_INFO(0, doc, DOMDocument, 0)
+   ZEND_ARG_INFO(0, doc)
ZEND_ARG_INFO(0, uri)
 ZEND_END_ARG_INFO();
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_transform_to_xml, 0, 0, 1)
-   ZEND_ARG_OBJ_INFO(0, doc, DOMDocument, 0)
+   ZEND_ARG_INFO(0, doc)
 ZEND_END_ARG_INFO();
 
 ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_set_parameter, 0, 0, 2)



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/xsl xsltprocessor.c

2008-12-05 Thread Rob Richards
rrichards   Fri Dec  5 18:36:16 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/xslxsltprocessor.c 
  Log:
  MFH: fix arginfo - these also accept SimpleXMLElement
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xsl/xsltprocessor.c?r1=1.39.2.2.2.14r2=1.39.2.2.2.15diff_format=u
Index: php-src/ext/xsl/xsltprocessor.c
diff -u php-src/ext/xsl/xsltprocessor.c:1.39.2.2.2.14 
php-src/ext/xsl/xsltprocessor.c:1.39.2.2.2.15
--- php-src/ext/xsl/xsltprocessor.c:1.39.2.2.2.14   Sun May  4 15:15:01 2008
+++ php-src/ext/xsl/xsltprocessor.c Fri Dec  5 18:36:16 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: xsltprocessor.c,v 1.39.2.2.2.14 2008/05/04 15:15:01 rrichards Exp $ */
+/* $Id: xsltprocessor.c,v 1.39.2.2.2.15 2008/12/05 18:36:16 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -30,23 +30,23 @@
 /* {{{ arginfo */
 static
 ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_import_stylesheet, 0, 0, 1)
-   ZEND_ARG_OBJ_INFO(0, doc, DOMDocument, 0)
+   ZEND_ARG_INFO(0, doc)
 ZEND_END_ARG_INFO();
 
 static
 ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_transform_to_doc, 0, 0, 1)
-   ZEND_ARG_OBJ_INFO(0, doc, DOMNode, 0)
+   ZEND_ARG_INFO(0, doc)
 ZEND_END_ARG_INFO();
 
 static
 ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_transform_to_uri, 0, 0, 2)
-   ZEND_ARG_OBJ_INFO(0, doc, DOMDocument, 0)
+   ZEND_ARG_INFO(0, doc)
ZEND_ARG_INFO(0, uri)
 ZEND_END_ARG_INFO();
 
 static
 ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_transform_to_xml, 0, 0, 1)
-   ZEND_ARG_OBJ_INFO(0, doc, DOMDocument, 0)
+   ZEND_ARG_INFO(0, doc)
 ZEND_END_ARG_INFO();
 
 static



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-CVS] cvs: php-src(PHP_5_2) /ext/xsl xsltprocessor.c

2008-12-05 Thread Rob Richards

Hannes Magnusson wrote:

On Fri, Dec 5, 2008 at 19:36, Rob Richards [EMAIL PROTECTED] wrote:
  

rrichards   Fri Dec  5 18:36:16 2008 UTC

 Modified files:  (Branch: PHP_5_2)
   /php-src/ext/xslxsltprocessor.c
 Log:
 MFH: fix arginfo - these also accept SimpleXMLElement

http://cvs.php.net/viewvc.cgi/php-src/ext/xsl/xsltprocessor.c?r1=1.39.2.2.2.14r2=1.39.2.2.2.15diff_format=u
Index: php-src/ext/xsl/xsltprocessor.c
diff -u php-src/ext/xsl/xsltprocessor.c:1.39.2.2.2.14 
php-src/ext/xsl/xsltprocessor.c:1.39.2.2.2.15
--- php-src/ext/xsl/xsltprocessor.c:1.39.2.2.2.14   Sun May  4 15:15:01 2008
+++ php-src/ext/xsl/xsltprocessor.c Fri Dec  5 18:36:16 2008
@@ -17,7 +17,7 @@
   +--+
 */

-/* $Id: xsltprocessor.c,v 1.39.2.2.2.14 2008/05/04 15:15:01 rrichards Exp $ */
+/* $Id: xsltprocessor.c,v 1.39.2.2.2.15 2008/12/05 18:36:16 rrichards Exp $ */

 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -30,23 +30,23 @@
 /* {{{ arginfo */
 static
 ZEND_BEGIN_ARG_INFO_EX(arginfo_xsl_xsltprocessor_import_stylesheet, 0, 0, 1)
-   ZEND_ARG_OBJ_INFO(0, doc, DOMDocument, 0)
+   ZEND_ARG_INFO(0, doc)
 ZEND_END_ARG_INFO();



Doesn't this mean E_ERROR is thrown when SimpleXML element is passed?
If so, this commit definitely deserves a NEWS entry

-Hannes
  
As of 5.2.6, a catchable error is currently being thrown, which is 
incorrect, so not sure whether or not this deserves an entry as it was 
broken with the 5.2.6 release. If a regression error deserves a NEWS 
entry then by all means.


Rob


--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/dom php_dom.c

2008-10-29 Thread Rob Richards
rrichards   Wed Oct 29 21:21:06 2008 UTC

  Modified files:  
/php-src/ext/domphp_dom.c 
  Log:
  fix bug #46406 (Unregistering nodeclass throws E_FATAL)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/php_dom.c?r1=1.112r2=1.113diff_format=u
Index: php-src/ext/dom/php_dom.c
diff -u php-src/ext/dom/php_dom.c:1.112 php-src/ext/dom/php_dom.c:1.113
--- php-src/ext/dom/php_dom.c:1.112 Fri Oct 24 14:34:12 2008
+++ php-src/ext/dom/php_dom.c   Wed Oct 29 21:21:06 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: php_dom.c,v 1.112 2008/10/24 14:34:12 felipe Exp $ */
+/* $Id: php_dom.c,v 1.113 2008/10/29 21:21:06 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -163,7 +163,7 @@
if (ce) {
return zend_u_hash_update(doc_props-classmap, 
UG(unicode)?IS_UNICODE:IS_STRING, basece-name, basece-name_length + 1, ce, 
sizeof(ce), NULL);
} else {
-   return zend_u_hash_del(doc_props-classmap, 
UG(unicode)?IS_UNICODE:IS_STRING, basece-name, basece-name_length + 1);
+   zend_u_hash_del(doc_props-classmap, 
UG(unicode)?IS_UNICODE:IS_STRING, basece-name, basece-name_length + 1);
}
}
return SUCCESS;



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/dom php_dom.c

2008-10-29 Thread Rob Richards
rrichards   Wed Oct 29 21:21:47 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/domphp_dom.c 
  Log:
  MFH: fix bug #46406 (Unregistering nodeclass throws E_FATAL)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/php_dom.c?r1=1.73.2.12.2.12.2.9r2=1.73.2.12.2.12.2.10diff_format=u
Index: php-src/ext/dom/php_dom.c
diff -u php-src/ext/dom/php_dom.c:1.73.2.12.2.12.2.9 
php-src/ext/dom/php_dom.c:1.73.2.12.2.12.2.10
--- php-src/ext/dom/php_dom.c:1.73.2.12.2.12.2.9Fri Oct 24 14:35:33 2008
+++ php-src/ext/dom/php_dom.c   Wed Oct 29 21:21:47 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: php_dom.c,v 1.73.2.12.2.12.2.9 2008/10/24 14:35:33 felipe Exp $ */
+/* $Id: php_dom.c,v 1.73.2.12.2.12.2.10 2008/10/29 21:21:47 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -188,7 +188,7 @@
if (ce) {
return zend_hash_update(doc_props-classmap, 
basece-name, basece-name_length + 1, ce, sizeof(ce), NULL);
} else {
-   return zend_hash_del(doc_props-classmap, basece-name, 
basece-name_length + 1);
+   zend_hash_del(doc_props-classmap, basece-name, 
basece-name_length + 1);
}
}
return SUCCESS;



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/dom php_dom.c

2008-10-29 Thread Rob Richards
rrichards   Wed Oct 29 21:22:34 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/domphp_dom.c 
  Log:
  MFH: fix bug #46406 (Unregistering nodeclass throws E_FATAL)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/php_dom.c?r1=1.73.2.12.2.13r2=1.73.2.12.2.14diff_format=u
Index: php-src/ext/dom/php_dom.c
diff -u php-src/ext/dom/php_dom.c:1.73.2.12.2.13 
php-src/ext/dom/php_dom.c:1.73.2.12.2.14
--- php-src/ext/dom/php_dom.c:1.73.2.12.2.13Mon Dec 31 07:20:06 2007
+++ php-src/ext/dom/php_dom.c   Wed Oct 29 21:22:34 2008
@@ -18,7 +18,7 @@
+--+
 */
 
-/* $Id: php_dom.c,v 1.73.2.12.2.13 2007/12/31 07:20:06 sebastian Exp $ */
+/* $Id: php_dom.c,v 1.73.2.12.2.14 2008/10/29 21:22:34 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -186,7 +186,7 @@
if (ce) {
return zend_hash_update(doc_props-classmap, 
basece-name, basece-name_length + 1, ce, sizeof(ce), NULL);
} else {
-   return zend_hash_del(doc_props-classmap, basece-name, 
basece-name_length + 1);
+   zend_hash_del(doc_props-classmap, basece-name, 
basece-name_length + 1);
}
}
return SUCCESS;



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/dom text.c /ext/dom/tests bug46335.phpt

2008-10-20 Thread Rob Richards
rrichards   Mon Oct 20 12:44:28 2008 UTC

  Added files: 
/php-src/ext/dom/tests  bug46335.phpt 

  Modified files:  
/php-src/ext/domtext.c 
  Log:
  fix bug #46335 (DOMText::splitText doesn't handle multibyte characters)
  add test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/text.c?r1=1.39r2=1.40diff_format=u
Index: php-src/ext/dom/text.c
diff -u php-src/ext/dom/text.c:1.39 php-src/ext/dom/text.c:1.40
--- php-src/ext/dom/text.c:1.39 Wed Sep 10 15:39:43 2008
+++ php-src/ext/dom/text.c  Mon Oct 20 12:44:28 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: text.c,v 1.39 2008/09/10 15:39:43 rrichards Exp $ */
+/* $Id: text.c,v 1.40 2008/10/20 12:44:28 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -171,19 +171,19 @@
if (cur == NULL) {
RETURN_FALSE;
}
-   length = xmlStrlen(cur);
+   length = xmlUTF8Strlen(cur);
 
if (offset  length || offset  0) {
xmlFree(cur);
RETURN_FALSE;
}
 
-   first = xmlStrndup(cur, offset);
-   second = xmlStrdup(cur + offset);
+   first = xmlUTF8Strndup(cur, offset);
+   second = xmlUTF8Strsub(cur, offset, length - offset);

xmlFree(cur);
 
-   xmlNodeSetContentLen(node, first, offset);
+   xmlNodeSetContent(node, first);
nnode = xmlNewDocText(node-doc, second);

xmlFree(first);

http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/bug46335.phpt?view=markuprev=1.1
Index: php-src/ext/dom/tests/bug46335.phpt
+++ php-src/ext/dom/tests/bug46335.phpt
--TEST--
Bug #46335 (DOMText::splitText doesn't handle multibyte characters).
--SKIPIF--
?php require_once('skipif.inc'); ?
--FILE--
?php 
$textascii = 'This is an example of using DOM splitText';
$text = 'This is an ‘example’ of using DOM splitText';
$start = 30;
$length = 3;

$dom = new DOMDocument('1.0', 'UTF-8');
$node = $dom-createTextNode($textascii);
$dom-appendChild($node);

print Text: $node-textContent\n;

$matched = $node-splitText($start);
$matched-splitText($length);
print splitText (ASCII): $matched-textContent\n;

$node = $dom-createTextNode($text);
$dom-appendChild($node);

print Text: $node-textContent\n;

$matched = $node-splitText($start);
$matched-splitText($length);
print splitText (UTF-8): $matched-textContent\n;
?
--EXPECT--
Text: This is an example of using DOM splitText
splitText (ASCII): DOM
Text: This is an ‘example’ of using DOM splitText
splitText (UTF-8): DOM



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/dom text.c /ext/dom/tests bug46335.phpt

2008-10-20 Thread Rob Richards
rrichards   Mon Oct 20 12:45:47 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/dom/tests  bug46335.phpt 

  Modified files:  
/php-src/ext/domtext.c 
  Log:
  MFH: fix bug #46335 (DOMText::splitText doesn't handle multibyte characters)
  add test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/text.c?r1=1.23.2.1.2.4.2.6r2=1.23.2.1.2.4.2.7diff_format=u
Index: php-src/ext/dom/text.c
diff -u php-src/ext/dom/text.c:1.23.2.1.2.4.2.6 
php-src/ext/dom/text.c:1.23.2.1.2.4.2.7
--- php-src/ext/dom/text.c:1.23.2.1.2.4.2.6 Wed Sep 10 15:40:11 2008
+++ php-src/ext/dom/text.c  Mon Oct 20 12:45:47 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: text.c,v 1.23.2.1.2.4.2.6 2008/09/10 15:40:11 rrichards Exp $ */
+/* $Id: text.c,v 1.23.2.1.2.4.2.7 2008/10/20 12:45:47 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -171,19 +171,19 @@
if (cur == NULL) {
RETURN_FALSE;
}
-   length = xmlStrlen(cur);
+   length = xmlUTF8Strlen(cur);
 
if (offset  length || offset  0) {
xmlFree(cur);
RETURN_FALSE;
}
 
-   first = xmlStrndup(cur, offset);
-   second = xmlStrdup(cur + offset);
+   first = xmlUTF8Strndup(cur, offset);
+   second = xmlUTF8Strsub(cur, offset, length - offset);

xmlFree(cur);
 
-   xmlNodeSetContentLen(node, first, offset);
+   xmlNodeSetContent(node, first);
nnode = xmlNewDocText(node-doc, second);

xmlFree(first);

http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/bug46335.phpt?view=markuprev=1.1
Index: php-src/ext/dom/tests/bug46335.phpt
+++ php-src/ext/dom/tests/bug46335.phpt
--TEST--
Bug #46335 (DOMText::splitText doesn't handle multibyte characters).
--SKIPIF--
?php require_once('skipif.inc'); ?
--FILE--
?php 
$textascii = 'This is an example of using DOM splitText';
$text = 'This is an ‘example’ of using DOM splitText';
$start = 30;
$length = 3;

$dom = new DOMDocument('1.0', 'UTF-8');
$node = $dom-createTextNode($textascii);
$dom-appendChild($node);

print Text: $node-textContent\n;

$matched = $node-splitText($start);
$matched-splitText($length);
print splitText (ASCII): $matched-textContent\n;

$node = $dom-createTextNode($text);
$dom-appendChild($node);

print Text: $node-textContent\n;

$matched = $node-splitText($start);
$matched-splitText($length);
print splitText (UTF-8): $matched-textContent\n;
?
--EXPECT--
Text: This is an example of using DOM splitText
splitText (ASCII): DOM
Text: This is an ‘example’ of using DOM splitText
splitText (UTF-8): DOM



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/dom text.c /ext/dom/tests bug46335.phpt

2008-10-20 Thread Rob Richards
rrichards   Mon Oct 20 12:46:23 2008 UTC

  Added files: (Branch: PHP_5_2)
/php-src/ext/dom/tests  bug46335.phpt 

  Modified files:  
/php-src/ext/domtext.c 
  Log:
  MFH: fix bug #46335 (DOMText::splitText doesn't handle multibyte characters)
  add test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/text.c?r1=1.23.2.1.2.7r2=1.23.2.1.2.8diff_format=u
Index: php-src/ext/dom/text.c
diff -u php-src/ext/dom/text.c:1.23.2.1.2.7 php-src/ext/dom/text.c:1.23.2.1.2.8
--- php-src/ext/dom/text.c:1.23.2.1.2.7 Wed Sep 10 15:40:34 2008
+++ php-src/ext/dom/text.c  Mon Oct 20 12:46:23 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: text.c,v 1.23.2.1.2.7 2008/09/10 15:40:34 rrichards Exp $ */
+/* $Id: text.c,v 1.23.2.1.2.8 2008/10/20 12:46:23 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -172,19 +172,19 @@
if (cur == NULL) {
RETURN_FALSE;
}
-   length = xmlStrlen(cur);
+   length = xmlUTF8Strlen(cur);
 
if (offset  length || offset  0) {
xmlFree(cur);
RETURN_FALSE;
}
 
-   first = xmlStrndup(cur, offset);
-   second = xmlStrdup(cur + offset);
+   first = xmlUTF8Strndup(cur, offset);
+   second = xmlUTF8Strsub(cur, offset, length - offset);

xmlFree(cur);
 
-   xmlNodeSetContentLen(node, first, offset);
+   xmlNodeSetContent(node, first);
nnode = xmlNewDocText(node-doc, second);

xmlFree(first);

http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/bug46335.phpt?view=markuprev=1.1
Index: php-src/ext/dom/tests/bug46335.phpt
+++ php-src/ext/dom/tests/bug46335.phpt
--TEST--
Bug #46335 (DOMText::splitText doesn't handle multibyte characters).
--SKIPIF--
?php require_once('skipif.inc'); ?
--FILE--
?php 
$textascii = 'This is an example of using DOM splitText';
$text = 'This is an ‘example’ of using DOM splitText';
$start = 30;
$length = 3;

$dom = new DOMDocument('1.0', 'UTF-8');
$node = $dom-createTextNode($textascii);
$dom-appendChild($node);

print Text: $node-textContent\n;

$matched = $node-splitText($start);
$matched-splitText($length);
print splitText (ASCII): $matched-textContent\n;

$node = $dom-createTextNode($text);
$dom-appendChild($node);

print Text: $node-textContent\n;

$matched = $node-splitText($start);
$matched-splitText($length);
print splitText (UTF-8): $matched-textContent\n;
?
--EXPECT--
Text: This is an example of using DOM splitText
splitText (ASCII): DOM
Text: This is an ‘example’ of using DOM splitText
splitText (UTF-8): DOM



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS

2008-10-20 Thread Rob Richards
rrichards   Mon Oct 20 12:46:58 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  BFN
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1264r2=1.2027.2.547.2.1265diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1264 php-src/NEWS:1.2027.2.547.2.1265
--- php-src/NEWS:1.2027.2.547.2.1264Sun Oct 19 18:16:43 2008
+++ php-src/NEWSMon Oct 20 12:46:57 2008
@@ -3,6 +3,8 @@
 ?? Oct 2008, PHP 5.2.7RC2
 - Fixed bug #46341 (Added missing validation checks into define() for class
   constants). (Ilia)
+- Fixed bug #46335 (DOMText::splitText doesn't handle multibyte characters).
+  (Rob)
 - Fixed bug #46319 (PHP sets default Content-Type header for HTTP 304
   response code, in cgi sapi). (Ilia)
 - Fixed bug #46308 (Invalid write when changing property from inside getter).



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/simplexml simplexml.c

2008-10-20 Thread Rob Richards
rrichards   Mon Oct 20 19:28:36 2008 UTC

  Modified files:  
/php-src/ext/simplexml  simplexml.c 
  Log:
  fix bug #46323 (compilation of simplexml for NetWare breaks)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/simplexml.c?r1=1.262r2=1.263diff_format=u
Index: php-src/ext/simplexml/simplexml.c
diff -u php-src/ext/simplexml/simplexml.c:1.262 
php-src/ext/simplexml/simplexml.c:1.263
--- php-src/ext/simplexml/simplexml.c:1.262 Thu Oct 16 11:42:20 2008
+++ php-src/ext/simplexml/simplexml.c   Mon Oct 20 19:28:36 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: simplexml.c,v 1.262 2008/10/16 11:42:20 indeyets Exp $ */
+/* $Id: simplexml.c,v 1.263 2008/10/20 19:28:36 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -1291,7 +1291,7 @@
if (nodeptr-type == XML_TEXT_NODE) {
_node_as_zval(sxe, nodeptr-parent, value, 
SXE_ITER_NONE, NULL, NULL, 0 TSRMLS_CC);
} else if (nodeptr-type == XML_ATTRIBUTE_NODE) {
-   _node_as_zval(sxe, nodeptr-parent, value, 
SXE_ITER_ATTRLIST, (char*)nodeptr-name, nodeptr-ns ? nodeptr-ns-href : 
NULL, 0 TSRMLS_CC);
+   _node_as_zval(sxe, nodeptr-parent, value, 
SXE_ITER_ATTRLIST, (char*)nodeptr-name, nodeptr-ns ? (xmlChar 
*)nodeptr-ns-href : NULL, 0 TSRMLS_CC);
} else {
_node_as_zval(sxe, nodeptr, value, 
SXE_ITER_NONE, NULL, NULL, 0 TSRMLS_CC);
}
@@ -2644,7 +2644,7 @@
 {
php_info_print_table_start();
php_info_print_table_header(2, Simplexml support, enabled);
-   php_info_print_table_row(2, Revision, $Revision: 1.262 $);
+   php_info_print_table_row(2, Revision, $Revision: 1.263 $);
php_info_print_table_row(2, Schema support,
 #ifdef LIBXML_SCHEMAS_ENABLED
enabled);



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/simplexml simplexml.c

2008-10-20 Thread Rob Richards
rrichards   Mon Oct 20 19:29:04 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/simplexml  simplexml.c 
  Log:
  MFH: fix bug #46323 (compilation of simplexml for NetWare breaks)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/simplexml.c?r1=1.151.2.22.2.35.2.21r2=1.151.2.22.2.35.2.22diff_format=u
Index: php-src/ext/simplexml/simplexml.c
diff -u php-src/ext/simplexml/simplexml.c:1.151.2.22.2.35.2.21 
php-src/ext/simplexml/simplexml.c:1.151.2.22.2.35.2.22
--- php-src/ext/simplexml/simplexml.c:1.151.2.22.2.35.2.21  Thu Oct 16 
11:38:25 2008
+++ php-src/ext/simplexml/simplexml.c   Mon Oct 20 19:29:04 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: simplexml.c,v 1.151.2.22.2.35.2.21 2008/10/16 11:38:25 indeyets Exp $ 
*/
+/* $Id: simplexml.c,v 1.151.2.22.2.35.2.22 2008/10/20 19:29:04 rrichards Exp $ 
*/
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -1274,7 +1274,7 @@
if (nodeptr-type == XML_TEXT_NODE) {
_node_as_zval(sxe, nodeptr-parent, value, 
SXE_ITER_NONE, NULL, NULL, 0 TSRMLS_CC);
} else if (nodeptr-type == XML_ATTRIBUTE_NODE) {
-   _node_as_zval(sxe, nodeptr-parent, value, 
SXE_ITER_ATTRLIST, (char*)nodeptr-name, nodeptr-ns ? nodeptr-ns-href : 
NULL, 0 TSRMLS_CC);
+   _node_as_zval(sxe, nodeptr-parent, value, 
SXE_ITER_ATTRLIST, (char*)nodeptr-name, nodeptr-ns ? (xmlChar 
*)nodeptr-ns-href : NULL, 0 TSRMLS_CC);
} else {
_node_as_zval(sxe, nodeptr, value, 
SXE_ITER_NONE, NULL, NULL, 0 TSRMLS_CC);
}
@@ -2562,7 +2562,7 @@
 {
php_info_print_table_start();
php_info_print_table_header(2, Simplexml support, enabled);
-   php_info_print_table_row(2, Revision, $Revision: 
1.151.2.22.2.35.2.21 $);
+   php_info_print_table_row(2, Revision, $Revision: 
1.151.2.22.2.35.2.22 $);
php_info_print_table_row(2, Schema support,
 #ifdef LIBXML_SCHEMAS_ENABLED
enabled);



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/simplexml simplexml.c

2008-10-20 Thread Rob Richards
rrichards   Mon Oct 20 19:29:40 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/simplexml  simplexml.c 
  Log:
  MFH: fix bug #46323 (compilation of simplexml for NetWare breaks)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/simplexml/simplexml.c?r1=1.151.2.22.2.44r2=1.151.2.22.2.45diff_format=u
Index: php-src/ext/simplexml/simplexml.c
diff -u php-src/ext/simplexml/simplexml.c:1.151.2.22.2.44 
php-src/ext/simplexml/simplexml.c:1.151.2.22.2.45
--- php-src/ext/simplexml/simplexml.c:1.151.2.22.2.44   Thu Sep 11 14:23:33 2008
+++ php-src/ext/simplexml/simplexml.c   Mon Oct 20 19:29:40 2008
@@ -18,7 +18,7 @@
   +--+
 */
 
-/* $Id: simplexml.c,v 1.151.2.22.2.44 2008/09/11 14:23:33 rrichards Exp $ */
+/* $Id: simplexml.c,v 1.151.2.22.2.45 2008/10/20 19:29:40 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -1233,7 +1233,7 @@
if (nodeptr-type == XML_TEXT_NODE) {
_node_as_zval(sxe, nodeptr-parent, value, 
SXE_ITER_NONE, NULL, NULL, 0 TSRMLS_CC);
} else if (nodeptr-type == XML_ATTRIBUTE_NODE) {
-   _node_as_zval(sxe, nodeptr-parent, value, 
SXE_ITER_ATTRLIST, (char*)nodeptr-name, nodeptr-ns ? nodeptr-ns-href : 
NULL, 0 TSRMLS_CC);
+   _node_as_zval(sxe, nodeptr-parent, value, 
SXE_ITER_ATTRLIST, (char*)nodeptr-name, nodeptr-ns ? (xmlChar 
*)nodeptr-ns-href : NULL, 0 TSRMLS_CC);
} else {
_node_as_zval(sxe, nodeptr, value, 
SXE_ITER_NONE, NULL, NULL, 0 TSRMLS_CC);
}
@@ -2450,7 +2450,7 @@
 {
php_info_print_table_start();
php_info_print_table_header(2, Simplexml support, enabled);
-   php_info_print_table_row(2, Revision, $Revision: 1.151.2.22.2.44 $);
+   php_info_print_table_row(2, Revision, $Revision: 1.151.2.22.2.45 $);
php_info_print_table_row(2, Schema support,
 #ifdef LIBXML_SCHEMAS_ENABLED
enabled);



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS

2008-10-20 Thread Rob Richards
rrichards   Mon Oct 20 19:30:56 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  BFN
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1266r2=1.2027.2.547.2.1267diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1266 php-src/NEWS:1.2027.2.547.2.1267
--- php-src/NEWS:1.2027.2.547.2.1266Mon Oct 20 18:45:23 2008
+++ php-src/NEWSMon Oct 20 19:30:56 2008
@@ -5,6 +5,8 @@
   constants). (Ilia)
 - Fixed bug #46335 (DOMText::splitText doesn't handle multibyte characters).
   (Rob)
+- Fixed bug #46323 (compilation of simplexml for NetWare breaks). 
+  (Patch by [EMAIL PROTECTED])
 - Fixed bug #46319 (PHP sets default Content-Type header for HTTP 304
   response code, in cgi sapi). (Ilia)
 - Fixed bug #46313 (Magic quotes broke $_FILES). (Arnaud)



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) / run-tests.php

2008-09-30 Thread Rob Richards
rrichards   Tue Sep 30 13:21:48 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcrun-tests.php 
  Log:
  MFH: Windows requires SystemRoot env var to run tests
  
http://cvs.php.net/viewvc.cgi/php-src/run-tests.php?r1=1.226.2.37.2.35.2.47r2=1.226.2.37.2.35.2.48diff_format=u
Index: php-src/run-tests.php
diff -u php-src/run-tests.php:1.226.2.37.2.35.2.47 
php-src/run-tests.php:1.226.2.37.2.35.2.48
--- php-src/run-tests.php:1.226.2.37.2.35.2.47  Fri Sep 12 14:15:05 2008
+++ php-src/run-tests.php   Tue Sep 30 13:21:48 2008
@@ -24,7 +24,7 @@
+--+
  */
 
-/* $Id: run-tests.php,v 1.226.2.37.2.35.2.47 2008/09/12 14:15:05 lbarnaud Exp 
$ */
+/* $Id: run-tests.php,v 1.226.2.37.2.35.2.48 2008/09/30 13:21:48 rrichards Exp 
$ */
 
 /* Sanity check to ensure that pcre extension needed by this script is 
available.
  * In the event it is not, print a nice error message indicating that this 
script will
@@ -111,6 +111,9 @@
 }
 
 $environment = isset($_ENV) ? $_ENV : array();
+if ((substr(PHP_OS, 0, 3) == WIN)  empty($environment[SystemRoot])) {
+  $environment[SystemRoot] = getenv(SystemRoot);
+}
 
 // Don't ever guess at the PHP executable location.
 // Require the explicit specification.
@@ -609,7 +612,7 @@
$html_output = is_resource($html_file);
break;
case '--version':
-   echo '$Revision: 1.226.2.37.2.35.2.47 
$' . \n;
+   echo '$Revision: 1.226.2.37.2.35.2.48 
$' . \n;
exit(1);
 
default:



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/openssl openssl.c

2008-09-30 Thread Rob Richards
rrichards   Tue Sep 30 14:40:58 2008 UTC

  Modified files:  
/php-src/ext/opensslopenssl.c 
  Log:
  initialize keyresource
  
http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/openssl.c?r1=1.168r2=1.169diff_format=u
Index: php-src/ext/openssl/openssl.c
diff -u php-src/ext/openssl/openssl.c:1.168 php-src/ext/openssl/openssl.c:1.169
--- php-src/ext/openssl/openssl.c:1.168 Thu Sep 18 16:02:09 2008
+++ php-src/ext/openssl/openssl.c   Tue Sep 30 14:40:58 2008
@@ -20,7 +20,7 @@
+--+
  */
 
-/* $Id: openssl.c,v 1.168 2008/09/18 16:02:09 scottmac Exp $ */
+/* $Id: openssl.c,v 1.169 2008/09/30 14:40:58 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -2408,7 +2408,7 @@
X509 * cert = NULL, *new_cert = NULL;
X509_REQ * csr;
EVP_PKEY * key = NULL, *priv_key = NULL;
-   long csr_resource, certresource = 0, keyresource;
+   long csr_resource, certresource = 0, keyresource = -1;
int i;
struct php_x509_request req;




-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/openssl openssl.c

2008-09-30 Thread Rob Richards
rrichards   Tue Sep 30 14:41:49 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/opensslopenssl.c 
  Log:
  MFH: initialize keyresource
  
http://cvs.php.net/viewvc.cgi/php-src/ext/openssl/openssl.c?r1=1.98.2.5.2.41.2.17r2=1.98.2.5.2.41.2.18diff_format=u
Index: php-src/ext/openssl/openssl.c
diff -u php-src/ext/openssl/openssl.c:1.98.2.5.2.41.2.17 
php-src/ext/openssl/openssl.c:1.98.2.5.2.41.2.18
--- php-src/ext/openssl/openssl.c:1.98.2.5.2.41.2.17Thu Sep 18 16:09:19 2008
+++ php-src/ext/openssl/openssl.c   Tue Sep 30 14:41:49 2008
@@ -20,7 +20,7 @@
+--+
  */
 
-/* $Id: openssl.c,v 1.98.2.5.2.41.2.17 2008/09/18 16:09:19 scottmac Exp $ */
+/* $Id: openssl.c,v 1.98.2.5.2.41.2.18 2008/09/30 14:41:49 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -2295,7 +2295,7 @@
X509 * cert = NULL, *new_cert = NULL;
X509_REQ * csr;
EVP_PKEY * key = NULL, *priv_key = NULL;
-   long csr_resource, certresource = 0, keyresource;
+   long csr_resource, certresource = 0, keyresource = -1;
int i;
struct php_x509_request req;




-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /sapi/cli/tests 002-win32.phpt

2008-09-30 Thread Rob Richards
rrichards   Tue Sep 30 15:10:34 2008 UTC

  Modified files:  
/php-src/sapi/cli/tests 002-win32.phpt 
  Log:
  use getenv
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/002-win32.phpt?r1=1.2r2=1.3diff_format=u
Index: php-src/sapi/cli/tests/002-win32.phpt
diff -u php-src/sapi/cli/tests/002-win32.phpt:1.2 
php-src/sapi/cli/tests/002-win32.phpt:1.3
--- php-src/sapi/cli/tests/002-win32.phpt:1.2   Mon Dec  4 17:48:27 2006
+++ php-src/sapi/cli/tests/002-win32.phpt   Tue Sep 30 15:10:34 2008
@@ -10,7 +10,7 @@
 --FILE--
 ?php
 
-$php = $_ENV['TEST_PHP_EXECUTABLE'];
+$php = getenv('TEST_PHP_EXECUTABLE');
 
 var_dump(`$php -n -r var_dump('hello');`);
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /sapi/cli/tests 002-win32.phpt

2008-09-30 Thread Rob Richards
rrichards   Tue Sep 30 15:11:05 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/sapi/cli/tests 002-win32.phpt 
  Log:
  MFH: use getenv
  
http://cvs.php.net/viewvc.cgi/php-src/sapi/cli/tests/002-win32.phpt?r1=1.1.2.3r2=1.1.2.3.2.1diff_format=u
Index: php-src/sapi/cli/tests/002-win32.phpt
diff -u php-src/sapi/cli/tests/002-win32.phpt:1.1.2.3 
php-src/sapi/cli/tests/002-win32.phpt:1.1.2.3.2.1
--- php-src/sapi/cli/tests/002-win32.phpt:1.1.2.3   Mon Dec  4 17:48:52 2006
+++ php-src/sapi/cli/tests/002-win32.phpt   Tue Sep 30 15:11:05 2008
@@ -10,7 +10,7 @@
 --FILE--
 ?php
 
-$php = $_ENV['TEST_PHP_EXECUTABLE'];
+$php = getenv('TEST_PHP_EXECUTABLE');
 
 var_dump(`$php -n -r var_dump('hello');`);
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/dom node.c /ext/dom/tests bug46185.phpt

2008-09-29 Thread Rob Richards
rrichards   Mon Sep 29 16:52:03 2008 UTC

  Added files: 
/php-src/ext/dom/tests  bug46185.phpt 

  Modified files:  
/php-src/ext/domnode.c 
  Log:
  fix bug #46185 (importNode changes the namespace of an XML element)
  add test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/node.c?r1=1.63r2=1.64diff_format=u
Index: php-src/ext/dom/node.c
diff -u php-src/ext/dom/node.c:1.63 php-src/ext/dom/node.c:1.64
--- php-src/ext/dom/node.c:1.63 Mon Sep 22 15:09:06 2008
+++ php-src/ext/dom/node.c  Mon Sep 29 16:52:03 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: node.c,v 1.63 2008/09/22 15:09:06 rrichards Exp $ */
+/* $Id: node.c,v 1.64 2008/09/29 16:52:03 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -178,15 +178,29 @@
 
 static void dom_reconcile_ns(xmlDocPtr doc, xmlNodePtr nodep) /* {{{ */
 {
-   xmlNsPtr nsptr;
+   xmlNsPtr nsptr, nsdftptr, curns, prevns = NULL;
 
if (nodep-type == XML_ELEMENT_NODE) {
/* Following if block primarily used for inserting nodes 
created via createElementNS */
-   if (nodep-nsDef != NULL  nodep-nsDef-href != NULL) {
-   if((nsptr = xmlSearchNsByHref(doc, nodep-parent, 
nodep-nsDef-href))  
-   (nodep-nsDef-prefix == NULL || 
xmlStrEqual(nsptr-prefix, nodep-nsDef-prefix))) {
-   dom_set_old_ns(doc, nodep-nsDef);
-   nodep-nsDef = NULL;
+   if (nodep-nsDef != NULL) {
+   curns = nodep-nsDef;
+   while (curns) {
+   nsdftptr = curns-next;
+   if (curns-href != NULL) {
+   if((nsptr = xmlSearchNsByHref(doc, 
nodep-parent, curns-href))  
+   (curns-prefix == NULL || 
xmlStrEqual(nsptr-prefix, curns-prefix))) {
+   curns-next = NULL;
+   if (prevns == NULL) {
+   nodep-nsDef = nsdftptr;
+   } else {
+   prevns-next = nsdftptr;
+   }
+   dom_set_old_ns(doc, curns);
+   curns = prevns;
+   }
+   }
+   prevns = curns;
+   curns = nsdftptr;
}
}
xmlReconciliateNs(doc, nodep);

http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/bug46185.phpt?view=markuprev=1.1
Index: php-src/ext/dom/tests/bug46185.phpt
+++ php-src/ext/dom/tests/bug46185.phpt
--TEST--
Bug #46185 (importNode changes the namespace of an XML element).
--SKIPIF--
?php require_once('skipif.inc'); ?
--FILE--
?php 
$aDOM = new DOMDocument();
$aDOM-loadXML('?xml version=1.0?
ns1:a xmlns:ns1=urn::ns/');
$a= $aDOM-firstChild;

$ok = new DOMDocument();
$ok-loadXML('?xml version=1.0?
ns1:ok xmlns:ns1=urn::ns xmlns=urn::REALwatch-me 
xmlns:default=urn::BOGUS//ns1:ok');

$imported= $aDOM-importNode($ok-firstChild, true);
$a-appendChild($imported);

echo $aDOM-saveXML();
?
--EXPECT--
?xml version=1.0?
ns1:a xmlns:ns1=urn::nsns1:ok xmlns=urn::REALwatch-me 
xmlns:default=urn::BOGUS//ns1:ok/ns1:a


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/dom node.c /ext/dom/tests bug46185.phpt

2008-09-29 Thread Rob Richards
rrichards   Mon Sep 29 16:52:45 2008 UTC

  Added files: (Branch: PHP_5_3)
/php-src/ext/dom/tests  bug46185.phpt 

  Modified files:  
/php-src/ext/domnode.c 
  Log:
  MFH: fix bug #46185 (importNode changes the namespace of an XML element)
  add test
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/node.c?r1=1.37.2.3.2.8.2.7r2=1.37.2.3.2.8.2.8diff_format=u
Index: php-src/ext/dom/node.c
diff -u php-src/ext/dom/node.c:1.37.2.3.2.8.2.7 
php-src/ext/dom/node.c:1.37.2.3.2.8.2.8
--- php-src/ext/dom/node.c:1.37.2.3.2.8.2.7 Mon Sep 22 15:09:46 2008
+++ php-src/ext/dom/node.c  Mon Sep 29 16:52:45 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: node.c,v 1.37.2.3.2.8.2.7 2008/09/22 15:09:46 rrichards Exp $ */
+/* $Id: node.c,v 1.37.2.3.2.8.2.8 2008/09/29 16:52:45 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -178,15 +178,29 @@
 
 static void dom_reconcile_ns(xmlDocPtr doc, xmlNodePtr nodep) /* {{{ */
 {
-   xmlNsPtr nsptr;
+   xmlNsPtr nsptr, nsdftptr, curns, prevns = NULL;
 
if (nodep-type == XML_ELEMENT_NODE) {
/* Following if block primarily used for inserting nodes 
created via createElementNS */
-   if (nodep-nsDef != NULL  nodep-nsDef-href != NULL) {
-   if((nsptr = xmlSearchNsByHref(doc, nodep-parent, 
nodep-nsDef-href))  
-   (nodep-nsDef-prefix == NULL || 
xmlStrEqual(nsptr-prefix, nodep-nsDef-prefix))) {
-   dom_set_old_ns(doc, nodep-nsDef);
-   nodep-nsDef = NULL;
+   if (nodep-nsDef != NULL) {
+   curns = nodep-nsDef;
+   while (curns) {
+   nsdftptr = curns-next;
+   if (curns-href != NULL) {
+   if((nsptr = xmlSearchNsByHref(doc, 
nodep-parent, curns-href))  
+   (curns-prefix == NULL || 
xmlStrEqual(nsptr-prefix, curns-prefix))) {
+   curns-next = NULL;
+   if (prevns == NULL) {
+   nodep-nsDef = nsdftptr;
+   } else {
+   prevns-next = nsdftptr;
+   }
+   dom_set_old_ns(doc, curns);
+   curns = prevns;
+   }
+   }
+   prevns = curns;
+   curns = nsdftptr;
}
}
xmlReconciliateNs(doc, nodep);

http://cvs.php.net/viewvc.cgi/php-src/ext/dom/tests/bug46185.phpt?view=markuprev=1.1
Index: php-src/ext/dom/tests/bug46185.phpt
+++ php-src/ext/dom/tests/bug46185.phpt
--TEST--
Bug #46185 (importNode changes the namespace of an XML element).
--SKIPIF--
?php require_once('skipif.inc'); ?
--FILE--
?php 
$aDOM = new DOMDocument();
$aDOM-loadXML('?xml version=1.0?
ns1:a xmlns:ns1=urn::ns/');
$a= $aDOM-firstChild;

$ok = new DOMDocument();
$ok-loadXML('?xml version=1.0?
ns1:ok xmlns:ns1=urn::ns xmlns=urn::REALwatch-me 
xmlns:default=urn::BOGUS//ns1:ok');

$imported= $aDOM-importNode($ok-firstChild, true);
$a-appendChild($imported);

echo $aDOM-saveXML();
?
--EXPECT--
?xml version=1.0?
ns1:a xmlns:ns1=urn::nsns1:ok xmlns=urn::REALwatch-me 
xmlns:default=urn::BOGUS//ns1:ok/ns1:a


-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) / NEWS

2008-09-29 Thread Rob Richards
rrichards   Mon Sep 29 16:53:09 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-srcNEWS 
  Log:
  BFN
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.965.2.332r2=1.2027.2.547.2.965.2.333diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.965.2.332 
php-src/NEWS:1.2027.2.547.2.965.2.333
--- php-src/NEWS:1.2027.2.547.2.965.2.332   Fri Sep 26 16:32:21 2008
+++ php-src/NEWSMon Sep 29 16:53:08 2008
@@ -10,6 +10,7 @@
 
 - Fixed bug causing the algorithm parameter of mhash() to be modified. (Scott)
 
+- Fixed bug #46185 (importNode changes the namespace of an XML element). (Rob)
 - Fixed bug #46178 (memory leak in ext/phar). (Greg)
 - Fixed bug #46160 (SPL - Memory leak when exception is thrown in offsetSet).
   (Felipe)



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/dom document.c

2008-09-28 Thread Rob Richards
rrichards   Sun Sep 28 11:59:54 2008 UTC

  Modified files:  
/php-src/ext/domdocument.c 
  Log:
  fix bug #46191 (BC break: DOMDocument saveXML() doesn't accept null)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/document.c?r1=1.93r2=1.94diff_format=u
Index: php-src/ext/dom/document.c
diff -u php-src/ext/dom/document.c:1.93 php-src/ext/dom/document.c:1.94
--- php-src/ext/dom/document.c:1.93 Thu Aug 14 08:38:37 2008
+++ php-src/ext/dom/document.c  Sun Sep 28 11:59:54 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: document.c,v 1.93 2008/08/14 08:38:37 tony2001 Exp $ */
+/* $Id: document.c,v 1.94 2008/09/28 11:59:54 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -155,7 +155,7 @@
 
 static
 ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_savexml, 0, 0, 0)
-   ZEND_ARG_OBJ_INFO(0, node, DOMNode, 0)
+   ZEND_ARG_OBJ_INFO(0, node, DOMNode, 1)
 ZEND_END_ARG_INFO();
 
 static



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/dom document.c

2008-09-28 Thread Rob Richards
rrichards   Sun Sep 28 12:00:37 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/domdocument.c 
  Log:
  MFH: fix bug #46191 (BC break: DOMDocument saveXML() doesn't accept null)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/document.c?r1=1.68.2.3.2.5.2.7r2=1.68.2.3.2.5.2.8diff_format=u
Index: php-src/ext/dom/document.c
diff -u php-src/ext/dom/document.c:1.68.2.3.2.5.2.7 
php-src/ext/dom/document.c:1.68.2.3.2.5.2.8
--- php-src/ext/dom/document.c:1.68.2.3.2.5.2.7 Thu Aug 14 08:39:04 2008
+++ php-src/ext/dom/document.c  Sun Sep 28 12:00:37 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: document.c,v 1.68.2.3.2.5.2.7 2008/08/14 08:39:04 tony2001 Exp $ */
+/* $Id: document.c,v 1.68.2.3.2.5.2.8 2008/09/28 12:00:37 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -153,7 +153,7 @@
 
 static
 ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_document_savexml, 0, 0, 0)
-   ZEND_ARG_OBJ_INFO(0, node, DOMNode, 0)
+   ZEND_ARG_OBJ_INFO(0, node, DOMNode, 1)
 ZEND_END_ARG_INFO();
 
 static



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) / NEWS

2008-09-28 Thread Rob Richards
rrichards   Sun Sep 28 12:03:00 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-srcNEWS 
  Log:
  BFN
  
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.1232r2=1.2027.2.547.2.1233diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.1232 php-src/NEWS:1.2027.2.547.2.1233
--- php-src/NEWS:1.2027.2.547.2.1232Tue Sep 23 23:10:01 2008
+++ php-src/NEWSSun Sep 28 12:02:59 2008
@@ -18,6 +18,7 @@
   (Scott)
 - Fixed a crash on invalid method in ReflectionParameter constructor.
   (Christian Seiler)
+- Fixed bug #46191 (BC break: DOMDocument saveXML() doesn't accept null). (Rob)
 - Fixed bug #46157 (PDOStatement::fetchObject prototype error). (Felipe)
 - Fixed bug #46147 (after stream seek, appending stream filter reads incorrect 
data).
   (Greg)



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/dom domconfiguration.c node.c

2008-09-22 Thread Rob Richards
rrichards   Mon Sep 22 15:09:07 2008 UTC

  Modified files:  
/php-src/ext/domdomconfiguration.c node.c 
  Log:
  fix hints causing phpdoc crash
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/domconfiguration.c?r1=1.12r2=1.13diff_format=u
Index: php-src/ext/dom/domconfiguration.c
diff -u php-src/ext/dom/domconfiguration.c:1.12 
php-src/ext/dom/domconfiguration.c:1.13
--- php-src/ext/dom/domconfiguration.c:1.12 Thu Aug 14 08:38:37 2008
+++ php-src/ext/dom/domconfiguration.c  Mon Sep 22 15:09:06 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: domconfiguration.c,v 1.12 2008/08/14 08:38:37 tony2001 Exp $ */
+/* $Id: domconfiguration.c,v 1.13 2008/09/22 15:09:06 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -31,7 +31,7 @@
 static
 ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_configuration_set_parameter, 0, 0, 2)
ZEND_ARG_INFO(0, name)
-   ZEND_ARG_OBJ_INFO(0, value, DOMUserData, 0)
+   ZEND_ARG_INFO(0, value)
 ZEND_END_ARG_INFO();
 
 static
@@ -42,7 +42,7 @@
 static
 ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_configuration_can_set_parameter, 0, 0, 0)
ZEND_ARG_INFO(0, name)
-   ZEND_ARG_OBJ_INFO(0, value, DOMUserData, 0)
+   ZEND_ARG_INFO(0, value)
 ZEND_END_ARG_INFO();
 /* }}} */
 
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/node.c?r1=1.62r2=1.63diff_format=u
Index: php-src/ext/dom/node.c
diff -u php-src/ext/dom/node.c:1.62 php-src/ext/dom/node.c:1.63
--- php-src/ext/dom/node.c:1.62 Thu Aug 14 08:38:37 2008
+++ php-src/ext/dom/node.c  Mon Sep 22 15:09:06 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: node.c,v 1.62 2008/08/14 08:38:37 tony2001 Exp $ */
+/* $Id: node.c,v 1.63 2008/09/22 15:09:06 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -112,7 +112,7 @@
 static
 ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_set_user_data, 0, 0, 3)
ZEND_ARG_INFO(0, key)
-   ZEND_ARG_OBJ_INFO(0, data, DOMUserData, 0)
+   ZEND_ARG_INFO(0, data)
ZEND_ARG_INFO(0, handler)
 ZEND_END_ARG_INFO();
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/dom domconfiguration.c node.c

2008-09-22 Thread Rob Richards
rrichards   Mon Sep 22 15:09:46 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/domdomconfiguration.c node.c 
  Log:
  MFH: fix hints causing phpdoc crash
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/domconfiguration.c?r1=1.5.2.1.2.1.2.4r2=1.5.2.1.2.1.2.5diff_format=u
Index: php-src/ext/dom/domconfiguration.c
diff -u php-src/ext/dom/domconfiguration.c:1.5.2.1.2.1.2.4 
php-src/ext/dom/domconfiguration.c:1.5.2.1.2.1.2.5
--- php-src/ext/dom/domconfiguration.c:1.5.2.1.2.1.2.4  Thu Aug 14 08:39:04 2008
+++ php-src/ext/dom/domconfiguration.c  Mon Sep 22 15:09:46 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: domconfiguration.c,v 1.5.2.1.2.1.2.4 2008/08/14 08:39:04 tony2001 Exp 
$ */
+/* $Id: domconfiguration.c,v 1.5.2.1.2.1.2.5 2008/09/22 15:09:46 rrichards Exp 
$ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -31,7 +31,7 @@
 static
 ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_configuration_set_parameter, 0, 0, 2)
ZEND_ARG_INFO(0, name)
-   ZEND_ARG_OBJ_INFO(0, value, DOMUserData, 0)
+   ZEND_ARG_INFO(0, value)
 ZEND_END_ARG_INFO();
 
 static
@@ -42,7 +42,7 @@
 static
 ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_configuration_can_set_parameter, 0, 0, 0)
ZEND_ARG_INFO(0, name)
-   ZEND_ARG_OBJ_INFO(0, value, DOMUserData, 0)
+   ZEND_ARG_INFO(0, value)
 ZEND_END_ARG_INFO();
 /* }}} */
 
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/node.c?r1=1.37.2.3.2.8.2.6r2=1.37.2.3.2.8.2.7diff_format=u
Index: php-src/ext/dom/node.c
diff -u php-src/ext/dom/node.c:1.37.2.3.2.8.2.6 
php-src/ext/dom/node.c:1.37.2.3.2.8.2.7
--- php-src/ext/dom/node.c:1.37.2.3.2.8.2.6 Thu Aug 14 08:39:04 2008
+++ php-src/ext/dom/node.c  Mon Sep 22 15:09:46 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: node.c,v 1.37.2.3.2.8.2.6 2008/08/14 08:39:04 tony2001 Exp $ */
+/* $Id: node.c,v 1.37.2.3.2.8.2.7 2008/09/22 15:09:46 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -112,7 +112,7 @@
 static
 ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_set_user_data, 0, 0, 3)
ZEND_ARG_INFO(0, key)
-   ZEND_ARG_OBJ_INFO(0, data, DOMUserData, 0)
+   ZEND_ARG_INFO(0, data)
ZEND_ARG_INFO(0, handler)
 ZEND_END_ARG_INFO();
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_2) /ext/dom domconfiguration.c node.c

2008-09-22 Thread Rob Richards
rrichards   Mon Sep 22 15:10:24 2008 UTC

  Modified files:  (Branch: PHP_5_2)
/php-src/ext/domdomconfiguration.c node.c 
  Log:
  MFH: fix hints causing phpdoc crash
  
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/domconfiguration.c?r1=1.5.2.1.2.3r2=1.5.2.1.2.4diff_format=u
Index: php-src/ext/dom/domconfiguration.c
diff -u php-src/ext/dom/domconfiguration.c:1.5.2.1.2.3 
php-src/ext/dom/domconfiguration.c:1.5.2.1.2.4
--- php-src/ext/dom/domconfiguration.c:1.5.2.1.2.3  Mon Feb  4 15:23:10 2008
+++ php-src/ext/dom/domconfiguration.c  Mon Sep 22 15:10:24 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: domconfiguration.c,v 1.5.2.1.2.3 2008/02/04 15:23:10 sebastian Exp $ */
+/* $Id: domconfiguration.c,v 1.5.2.1.2.4 2008/09/22 15:10:24 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -32,7 +32,7 @@
 static
 ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_configuration_set_parameter, 0, 0, 2)
ZEND_ARG_INFO(0, name)
-   ZEND_ARG_OBJ_INFO(0, value, DOMUserData, 0)
+   ZEND_ARG_INFO(0, value)
 ZEND_END_ARG_INFO();
 
 static
@@ -43,7 +43,7 @@
 static
 ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_configuration_can_set_parameter, 0, 0, 0)
ZEND_ARG_INFO(0, name)
-   ZEND_ARG_OBJ_INFO(0, value, DOMUserData, 0)
+   ZEND_ARG_INFO(0, value)
 ZEND_END_ARG_INFO();
 /* }}} */
 
http://cvs.php.net/viewvc.cgi/php-src/ext/dom/node.c?r1=1.37.2.3.2.11r2=1.37.2.3.2.12diff_format=u
Index: php-src/ext/dom/node.c
diff -u php-src/ext/dom/node.c:1.37.2.3.2.11 
php-src/ext/dom/node.c:1.37.2.3.2.12
--- php-src/ext/dom/node.c:1.37.2.3.2.11Wed Jan 30 06:48:20 2008
+++ php-src/ext/dom/node.c  Mon Sep 22 15:10:24 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: node.c,v 1.37.2.3.2.11 2008/01/30 06:48:20 sebastian Exp $ */
+/* $Id: node.c,v 1.37.2.3.2.12 2008/09/22 15:10:24 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -112,7 +112,7 @@
 static
 ZEND_BEGIN_ARG_INFO_EX(arginfo_dom_node_set_user_data, 0, 0, 3)
ZEND_ARG_INFO(0, key)
-   ZEND_ARG_OBJ_INFO(0, data, DOMUserData, 0)
+   ZEND_ARG_INFO(0, data)
ZEND_ARG_INFO(0, handler)
 ZEND_END_ARG_INFO();
 



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/gd gd.c

2008-09-22 Thread Rob Richards
rrichards   Mon Sep 22 15:30:59 2008 UTC

  Modified files:  
/php-src/ext/gd gd.c 
  Log:
  sz is long not zval**
  
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/gd.c?r1=1.393r2=1.394diff_format=u
Index: php-src/ext/gd/gd.c
diff -u php-src/ext/gd/gd.c:1.393 php-src/ext/gd/gd.c:1.394
--- php-src/ext/gd/gd.c:1.393   Fri Aug 29 11:09:05 2008
+++ php-src/ext/gd/gd.c Mon Sep 22 15:30:59 2008
@@ -18,7 +18,7 @@
+--+
  */
 
-/* $Id: gd.c,v 1.393 2008/08/29 11:09:05 pajoye Exp $ */
+/* $Id: gd.c,v 1.394 2008/09/22 15:30:59 rrichards Exp $ */
 
 /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
@@ -4231,10 +4231,10 @@
/*
printf(%d %d %d %d\n, str_bbox.llx, str_bbox.lly, str_bbox.urx, 
str_bbox.ury);
*/
-   add_next_index_long(return_value, (int) ceil(((double) 
str_bbox.llx)*Z_LVAL_PP(sz)/1000));
-   add_next_index_long(return_value, (int) ceil(((double) 
str_bbox.lly)*Z_LVAL_PP(sz)/1000));
-   add_next_index_long(return_value, (int) ceil(((double) 
str_bbox.urx)*Z_LVAL_PP(sz)/1000));
-   add_next_index_long(return_value, (int) ceil(((double) 
str_bbox.ury)*Z_LVAL_PP(sz)/1000));
+   add_next_index_long(return_value, (int) ceil(((double) 
str_bbox.llx)*sz/1000));
+   add_next_index_long(return_value, (int) ceil(((double) 
str_bbox.lly)*sz/1000));
+   add_next_index_long(return_value, (int) ceil(((double) 
str_bbox.urx)*sz/1000));
+   add_next_index_long(return_value, (int) ceil(((double) 
str_bbox.ury)*sz/1000));
 }
 /* }}} */
 #endif



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src /ext/xsl php_xsl.c xsltprocessor.c

2008-09-18 Thread Rob Richards
rrichards   Thu Sep 18 11:46:54 2008 UTC

  Modified files:  
/php-src/ext/xslxsltprocessor.c php_xsl.c 
  Log:
  fix bug #46099 (Xsltprocessor::setProfiling - memory leak)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xsl/xsltprocessor.c?r1=1.65r2=1.66diff_format=u
Index: php-src/ext/xsl/xsltprocessor.c
diff -u php-src/ext/xsl/xsltprocessor.c:1.65 
php-src/ext/xsl/xsltprocessor.c:1.66
--- php-src/ext/xsl/xsltprocessor.c:1.65Sun Aug  3 12:12:45 2008
+++ php-src/ext/xsl/xsltprocessor.c Thu Sep 18 11:46:54 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: xsltprocessor.c,v 1.65 2008/08/03 12:12:45 jani Exp $ */
+/* $Id: xsltprocessor.c,v 1.66 2008/09/18 11:46:54 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -555,10 +555,6 @@
php_libxml_decrement_doc_ref(intern-doc TSRMLS_CC);
efree(intern-doc);
intern-doc = NULL;
-   
-   if (intern-profiling) {
-   efree(intern-profiling);
-   }
 
if (params) {
clone = 0;
@@ -882,13 +878,20 @@
 {
zval *id;
xsl_object *intern;
-   char *filename;
+   char *filename = NULL;
int filename_len;
DOM_GET_THIS(id);
 
-   if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() 
TSRMLS_CC, s, filename, filename_len) == SUCCESS) {
+   if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() 
TSRMLS_CC, s!, filename, filename_len) == SUCCESS) {
intern = (xsl_object *)zend_object_store_get_object(id 
TSRMLS_CC);
-   intern-profiling = estrndup(filename,filename_len);
+   if (intern-profiling) {
+   efree(intern-profiling);
+   }
+   if (filename != NULL) {
+   intern-profiling = estrndup(filename,filename_len);
+   } else {
+   intern-profiling = NULL;
+   }
RETURN_TRUE;
} else {
WRONG_PARAM_COUNT;
http://cvs.php.net/viewvc.cgi/php-src/ext/xsl/php_xsl.c?r1=1.45r2=1.46diff_format=u
Index: php-src/ext/xsl/php_xsl.c
diff -u php-src/ext/xsl/php_xsl.c:1.45 php-src/ext/xsl/php_xsl.c:1.46
--- php-src/ext/xsl/php_xsl.c:1.45  Mon Dec 31 07:12:17 2007
+++ php-src/ext/xsl/php_xsl.c   Thu Sep 18 11:46:54 2008
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_xsl.c,v 1.45 2007/12/31 07:12:17 sebastian Exp $ */
+/* $Id: php_xsl.c,v 1.46 2008/09/18 11:46:54 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -103,6 +103,9 @@
xsltFreeStylesheet((xsltStylesheetPtr) intern-ptr);
intern-ptr = NULL;
}
+   if (intern-profiling) {
+   efree(intern-profiling);
+   }
efree(object);
 }
 /* }}} */



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-CVS] cvs: php-src(PHP_5_3) /ext/xsl php_xsl.c xsltprocessor.c

2008-09-18 Thread Rob Richards
rrichards   Thu Sep 18 11:47:59 2008 UTC

  Modified files:  (Branch: PHP_5_3)
/php-src/ext/xslxsltprocessor.c php_xsl.c 
  Log:
  MFH: fix bug #46099 (Xsltprocessor::setProfiling - memory leak)
  
http://cvs.php.net/viewvc.cgi/php-src/ext/xsl/xsltprocessor.c?r1=1.39.2.2.2.9.2.8r2=1.39.2.2.2.9.2.9diff_format=u
Index: php-src/ext/xsl/xsltprocessor.c
diff -u php-src/ext/xsl/xsltprocessor.c:1.39.2.2.2.9.2.8 
php-src/ext/xsl/xsltprocessor.c:1.39.2.2.2.9.2.9
--- php-src/ext/xsl/xsltprocessor.c:1.39.2.2.2.9.2.8Sun May  4 15:14:23 2008
+++ php-src/ext/xsl/xsltprocessor.c Thu Sep 18 11:47:59 2008
@@ -17,7 +17,7 @@
+--+
 */
 
-/* $Id: xsltprocessor.c,v 1.39.2.2.2.9.2.8 2008/05/04 15:14:23 rrichards Exp $ 
*/
+/* $Id: xsltprocessor.c,v 1.39.2.2.2.9.2.9 2008/09/18 11:47:59 rrichards Exp $ 
*/
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -554,10 +554,6 @@
php_libxml_decrement_doc_ref(intern-doc TSRMLS_CC);
efree(intern-doc);
intern-doc = NULL;
-   
-   if (intern-profiling) {
-   efree(intern-profiling);
-   }
 
if (params) {
clone = 0;
@@ -849,13 +845,20 @@
 {
zval *id;
xsl_object *intern;
-   char *filename;
+   char *filename = NULL;
int filename_len;
DOM_GET_THIS(id);
 
-   if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() 
TSRMLS_CC, s, filename, filename_len) == SUCCESS) {
+   if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() 
TSRMLS_CC, s!, filename, filename_len) == SUCCESS) {
intern = (xsl_object *)zend_object_store_get_object(id 
TSRMLS_CC);
-   intern-profiling = estrndup(filename,filename_len);
+   if (intern-profiling) {
+   efree(intern-profiling);
+   }
+   if (filename != NULL) {
+   intern-profiling = estrndup(filename,filename_len);
+   } else {
+   intern-profiling = NULL;
+   }
RETURN_TRUE;
} else {
WRONG_PARAM_COUNT;
http://cvs.php.net/viewvc.cgi/php-src/ext/xsl/php_xsl.c?r1=1.32.2.6.2.2.2.4r2=1.32.2.6.2.2.2.5diff_format=u
Index: php-src/ext/xsl/php_xsl.c
diff -u php-src/ext/xsl/php_xsl.c:1.32.2.6.2.2.2.4 
php-src/ext/xsl/php_xsl.c:1.32.2.6.2.2.2.5
--- php-src/ext/xsl/php_xsl.c:1.32.2.6.2.2.2.4  Mon Dec 31 07:17:16 2007
+++ php-src/ext/xsl/php_xsl.c   Thu Sep 18 11:47:59 2008
@@ -16,7 +16,7 @@
   +--+
 */
 
-/* $Id: php_xsl.c,v 1.32.2.6.2.2.2.4 2007/12/31 07:17:16 sebastian Exp $ */
+/* $Id: php_xsl.c,v 1.32.2.6.2.2.2.5 2008/09/18 11:47:59 rrichards Exp $ */
 
 #ifdef HAVE_CONFIG_H
 #include config.h
@@ -103,6 +103,9 @@
xsltFreeStylesheet((xsltStylesheetPtr) intern-ptr);
intern-ptr = NULL;
}
+   if (intern-profiling) {
+   efree(intern-profiling);
+   }
efree(object);
 }
 /* }}} */



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



  1   2   3   4   5   6   7   8   >