Re: [PHP-DEV] ze1_compatibility_mode and cloning

2004-08-27 Thread Andi Gutmans
At 01:56 PM 8/27/2004 -0400, Rob Richards wrote: I hadn't even thought about that but it should give the desired results. Can the error message be modified slightly to indicate that it is running under ze1 compat in zend_execute.c? Right now it just says: "Trying to clone an uncloneable object of c

Re: [PHP-DEV] ze1_compatibility_mode and cloning

2004-08-27 Thread Rob Richards
I hadn't even thought about that but it should give the desired results. Can the error message be modified slightly to indicate that it is running under ze1 compat in zend_execute.c? Right now it just says: "Trying to clone an uncloneable object of class %s", which is fine in most cases, but at lea

Re: [PHP-DEV] ze1_compatibility_mode and cloning

2004-08-27 Thread Andi Gutmans
At 05:54 AM 8/27/2004 -0400, Rob Richards wrote: That would be fine to not allow the problem extensions to run under ze1 and end up issuing zend_error(E_ERROR, "Trying to clone an uncloneable object of class %s", Z_OBJCE_P(value)->name) (which currently happens when no clone handler is implimented

Re: [PHP-DEV] ze1_compatibility_mode and cloning

2004-08-27 Thread Rob Richards
That would be fine to not allow the problem extensions to run under ze1 and end up issuing zend_error(E_ERROR, "Trying to clone an uncloneable object of class %s", Z_OBJCE_P(value)->name) (which currently happens when no clone handler is implimented). In order for that to happen though the extens

Re: [PHP-DEV] ze1_compatibility_mode and cloning

2004-08-26 Thread Andi Gutmans
Hi Rob, I understand the problem although I haven't analyzed it in as much depth as you have as to when exactly it happens. The thing is that I see compatibility_mode as something which is supposed to help make most old scripts run with PHP 5. I think scripts that take advantage of new PHP 5 fea

Re: [PHP-DEV] ze1_compatibility_mode and cloning

2004-08-26 Thread Rob Richards
The issue is that with some of the new extensions, the object "breaks" when compatibility mode is enabled making the extensions useless. The patch was basically an attempt to allow a way for the extensions to be able to run under compatibility mode. Take for example a simple case (NULL is returned

Re: [PHP-DEV] ze1_compatibility_mode and cloning

2004-08-26 Thread Andi Gutmans
What is the issue? In general, as it's compatibility mode it's not supposed to solve 100% but only 99.5% of the problems, and I don't really want to change the engine's general API unless it's for a good reason. Actually I have not seen many applications that have been broken due to the removal

[PHP-DEV] ze1_compatibility_mode and cloning

2004-08-26 Thread Rob Richards
ze1_compatibility_mode when set on calls clone on objects implicitly and is causing some issues with extensions such as dom and xsl to name a few. Is it possible to add something like the contained patch, which would allow an object to implement an additional clone handler used only when the clone