Stefan, I've committed changes that address all of these issues. Please test
and get back to me with your results.
Thanks,
Derrell
On Wed, Jan 14, 2009 at 8:02 PM, Stefan Volbers <[email protected]> wrote:
> Hi there,
>
> error handling in the PHP RPC backend breaks in PHP4 due to a change in
> behaviour of get_class(). In PHP4 it returns the name in all lowercase,
> which breaks the string comparison in line 844, thus not identifying the
> backend triggered error.
>
> Furthermore, when calling the target RPC class method, the $error object
> in PHP4 is not automatically taken by reference (can someone point me to
> the PHP manual page where the change in this behaviour is written?);
> instead the error data is found in the returned object $output.
>
> Last but not least I'd like to propose a simple getError() method to
> test in place whether an error has yet been defined; this would allow an
> RPC method to carry the $error object to another method and react if an
> error got triggered there.
>
> To fix, apply this tiny patch to index.php:
>
> 300a301,305
> >
> > function GetError()
> > {
> > return $this->data["code"];
> > }
> 844c849
> < if (get_class($output) == "JsonRpcError")
> ---
> > if (strtolower(get_class($output)) == "jsonrpcerror")
> 847c852
> < $error->SendAndExit();
> ---
> > $output->SendAndExit();
>
>
> I was only able to test this in small scale, so please anyone who's
> interested in having a PHP4 backend write his oder her experiences - I'm
> really not that much into PHP4's OOP.
>
> Thanks for your attention,
>
> bye,
> Stefan
>
>
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by:
> SourcForge Community
> SourceForge wants to tell your story.
> http://p.sf.net/sfu/sf-spreadtheword
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel