[Tickets #5604] Re: ListMessages endless loop

bugs at bugs.horde.org bugs at bugs.horde.org
Wed Aug 8 03:59:28 UTC 2007


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: http://bugs.horde.org/ticket/?id=5604
-----------------------------------------------------------------------
 Ticket             | 5604
 Updated By         | vokac at kmlinux.fjfi.cvut.cz
 Summary            | ListMessages endless loop
 Queue              | DIMP
 Version            | 1.0-ALPHA
 Type               | Bug
 State              | Feedback
 Priority           | 1. Low
 Owners             | 
-----------------------------------------------------------------------


vokac at kmlinux.fjfi.cvut.cz (2007-08-07 20:59) wrote:

> To me, this indicates that the version of PHP that ships with CentOS 
> is broken.  If these functions are not doing what they are supposed 
> to be doing, there's not much we can do about that in our code.  And 
> get_object_vars() has been around since PHP 4 so this shouldn't be a 
> code stability/maturity issue.

Well I made tests with script I send ealier with other four different
versions of PHP and the result for 5.x versions are always same (bad),
version 4.x works:


Official windows version PHP 4.4.7 - get_object_vars works:

c:\Documents and Settings\vokac\Desktop\php-4.4.7-Win32>php test.php
X-Powered-By: PHP/4.4.7
Content-type: text/html

get_object_vars:
  >> 1: 1
  >> 2: 2
iterator(?):
  >> 1: 1
  >> 2: 2



Official windows version PHP 5.2.3 - get_object_vars doesnt work:

c:\Documents and Settings\vokac.ATLASDELL\Desktop\php-5.2.3-Win32>php
test2.php
get_object_vars:
iterator(?):
  >> 1: 1
  >> 2: 2



Official PHP 4.3.9 from RHEL4/CentOS4, get_object_vars works:

[root at mailgw1 html]# php test2.php
Content-type: text/html
X-Powered-By: PHP/4.3.9

get_object_vars:
  >> 1: 1
  >> 2: 2
iterator(?):
  >> 1: 1
  >> 2: 2



PHP 5.1.6 compiled from official sources (without any patch) -
get_object_vars doesnt work, iterator doesnt work:

[vokac at kmlinux cgi]$ ./php test2.php
X-Powered-By: PHP/5.1.6
Content-type: text/html

get_object_vars:
iterator(?):



Did you try the testing code in you PHP 5.x version? Does it work
correctly? I really don't know what I should do to force get_object_vars
work in PHP 5.x


<?php
$a = array('1' => 1, '2' => 2);
$b = (object)$a;
$c = get_object_vars($b);
echo "get_object_vars:\n";
foreach($c as $name=>$value) {
  echo "  $name: $value\n";
}
echo "iterator(?):\n";
foreach($b as $name=>$value) {
  echo "  $name: $value\n";
}
?>



More information about the bugs mailing list