on line 25 of imap_mailbox is the following line
....(Line might vary as I'm using a version specific to
$mbx_parent = &$this;
This is a bug specific to PHP 5.1, in PHP 5.0 and PHP4
this is fine (and in PHP4 the & is needed). However in
PHP 5.1, the reference operatror, &, seems to create a
fatal error in PHP stating it can not reassign $this.
To me this is a PHP bug, and I have told the guys at
Zend (see: http://bugs.php.net/bug.php?id=32745\)
However, the guys at Zend seem to think different. I
have replied to them (no reply yet), saying that I
think they are mad because this breaks a load of
compatiblity with PHP 4.x's querks. However they seem
to have some random excuse, saying that $mbx_parent
could already be === to $this, and therefore therefore
they prevent the assignment of the reference as this
internally screws up PHP. However I've said it works
fine in earlier versions of PHP, so why do things screw
up now to them.
Anyway to cut a long story short, it seems they won't
fix this, so it seems it might be an idea for you to
make a fix / hack.
I simply removed the &, and this should be fine for
PHP5.x as assignment is done by reference on PHP5.
However this will break on PHP4 I'm sure. If this is
the case it might be an idea to look into some other
way round this. Another idea would be to bug the guys
on the Zend bug reporting site by adding comments to my
PHP bug report so they listen to the fact they are
breaking a load of backward compatiblity + older scripts.