From: Jost B. <jos...@ya...> - 2005-11-27 23:06:30
|
Hi Alan, problem confirmed. php > 5.0.3 simply crashes when you pass an empty list. > --> <I m="hasMore" p="I" i="46203008"></I> > <-- <B v="F" i="46203008"/> > --> <I v="5" m="currentKey" p="I" i="46194528"></I> it seems that since version 5.0.5 the zend interator advances one element too far when the list is empty. According to your log you have passed an empty list. The zend iterator asks us "hasMore", we return false. After that it asks for the current key(!?!) which doesn't exist, of course, we have returned false! What follows is that php becomes confused and crashes: The currentKey() that java returns isn't valid and php tries to examine the key len, which may or may not result in a segmentation fault and a php crash. I will check the details tomorrow evening, in the meantime please use the following workaround: $php_array = java_values($javaList); // now you can iterate over php_array which checks for // the above invalid condition. Or please downgrade to php 5.0.3 or below. :(( Regards, Jost Boekemeier P.S.: My plan was to drop PHP4 support in PHP/Java Bridge Version 3.0. I don't think this is possible considering that every new php 5 release introduces new bugs. (Since php 5.1 even the serialization doesn't work anymore, which worked in the php5.1 pre betas)... ___________________________________________________________ Gesendet von Yahoo! Mail - Jetzt mit 1GB Speicher kostenlos - Hier anmelden: http://mail.yahoo.de |