John Dennis wrote:
I've been working on getting roundcube mail to work with some of our packages here at Red Hat, by the way you guys have done a great job!
Hi John
Par for the course with early development I hit some snags, that's to be expected. I'm currently trying to get SMTP to work (we use TLS) and I wasn't getting any error messages. I finally tracked it down to what appears to be a typo in PEAR::isError()
function isError($data) { return (bool)(is_object($data) && (get_class($data) == 'pear_error' || is_subclass_of($data, 'pear_error'))); }
The class name is PEAR_Error not pear_error, thus PEAR::isError() always returns false and errors are never caught. Once I fixed that debugging got a whole lot easier :-)
Thanks for the hint. As read in the PHP manual, the class name is returned in lower case in PHP 4 and in it's original notation in PHP 5. I will update the PEAR class to provide full PHP 5 compatibility.
BTW, DB:isError() appears to be fine, also the problem appears to still be in the CVS version of PEAR.php.
On a couple of other notes:
I noticed a lot of the smtp functions don't check for errors. Also it would be nice if when an error is encountered it was logged to a file. log_bug() in bugs.inc seems like the right logging function to call when errors are detected, right? I'm happy to make some patches if you're willing to take them.
Has anyone started work on an RPM yet? If not I would volunteer to do that for you and contribute it.
As far as I know there's nobody who started to make an RPM package of RoundCube. I'm not sure if it's too early to create one but I would appreciate it.
Regards, Thomas