From: Jost B. <jos...@ya...> - 2005-02-01 19:24:50
|
> Jan 31 21:04:26 JavaBridge DEBUG: returning map for > class [Lorg.omg.WfBase.NameValue; Thanks. You're right, iterating over non-primitive values of arrays wasn't possible until now. I have just checked a fix into the CVS head. I am going to test and release 1.0.8 asap, hopefully this weekend. Until then please use PHP 5 and PHP/Java Bridge 1.0.7 with the following patch applied (see below). Thank you for reporting this bug. Regards, Jost Boekemeier --- Patch against 1.0.7 release: Index: java.c =================================================================== RCS file: /cvsroot/php-java-bridge/php-java-bridge/java.c,v retrieving revision 1.37 retrieving revision 1.38 diff -u -r1.37 -r1.38 --- java.c 29 Jan 2005 10:09:33 -0000 1.37 +++ java.c 1 Feb 2005 19:07:35 -0000 1.38 @@ -599,6 +647,7 @@ zval *presult; MAKE_STD_ZVAL(presult); + ZVAL_NULL(presult); php_java_invoke("currentKey", iterator->java_iterator, 0, 0, presult); @@ -635,6 +684,7 @@ static void init_current_data(java_iterator *iterator TSRMLS_DC) { MAKE_STD_ZVAL(iterator->current_object); + ZVAL_NULL(iterator->current_object); php_java_invoke("currentData", iterator->java_iterator, 0, 0, iterator->curre nt_object); } Index: ChangeLog =================================================================== RCS file: /cvsroot/php-java-bridge/php-java-bridge/ChangeLog,v retrieving revision 1.46 retrieving revision 1.49 diff -u -r1.46 -r1.49 --- ChangeLog 29 Jan 2005 10:09:32 -0000 1.46 +++ ChangeLog 1 Feb 2005 19:07:35 -0000 1.49 @@ -1,3 +1,18 @@ +2005-02-01 Jost Boekemeier <jostb@intern> + + * java.c (iterator_current_key, init_current_data): PHP does not + necessarily return "clean" zvals. Zero out the allocated zval so + that setResultFromObject can initialize it properly. This fixes a + bug in the iterator interface which was not able to iterate over + arrays of non-primitive types. ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 250MB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |