It looks like call_user_func_array() isn't triggering the spl autoloaders. Could be a php bug? You could setup a standalone test outside of symfony to verify if it is a problem with php itself.
- Jon On Wed, Dec 17, 2008 at 4:41 PM, David Brewer <[email protected]>wrote: > > I discovered that this issue can be 'fixed' (or rather, hacked around) > by explicitly checking for the existence of the class before calling > the callback. In other words, this was failing: > > $result = call_user_func_array("MyClass::MyMethod", array()); > > But, this works: > > class_exists('MyClass'); > $result = call_user_func_array("MyClass::MyMethod", array()); > > Ugly, but at least it keeps me moving forward for now. > > David > > On Wed, Dec 17, 2008 at 1:21 PM, Lee Bolding <[email protected]> wrote: > > > > This sounds similar to an issue I had earlier this week. It seems that > > if you extend a class that isn't in the path (and hasn't YET been > > autoloaded), you run into problems. > > > > I need to do a bit more research to verify this, so maybe over the > > Xmas/New Year period I'll take a more thorough look at it. > > > > BTW, to solve white screen of death problems, try out my > > sfErrorHandlerPlugin here : > http://www.symfony-project.org/plugins/sfErrorHandlerPlugin > > > > > > On 17 Dec 2008, at 19:36, David Brewer wrote: > > > >> > >> So, I'm working my way through the process of upgrading to symfony 1.1 > >> and then symfony 1.2, and overall it's been going pretty well but now > >> I'm stuck on something which I think is related to autoloading and > >> callbacks. The original symptom was the blank white screen of death. > >> > >> I traced this down to a 'call_user_func_array()' call using a callback > >> to a method on a Doctrine_Record. What's weird is that whether it > >> succeeds or fails changes depending on where I call it. If I call it > >> directly in my action, it works perfectly. However, I have extended > >> sfActions and my action is actually extending this intermediate class > >> (called 'restActions'). > >> > >> So, I'm passing the callback to a method defined in restActions... and > >> when I call it there PHP segfaults immediately. However, if I have > >> already called the callback once before in the subclass (where it > >> works), then it works in restActions too. > >> > >> This makes me think that maybe the autoloader can't find it for some > >> reason unless it has already been loaded? If this rings a bell for > >> anyone and you can offer some insight on what to dig into next it > >> would be very much appreciated. > >> > >> PHP 5.2.4 on Ubuntu Hardy. Symfony 1.1 (was originally Symfony 1.0 > >> project, in progress of upgrading). > >> > >> Thanks, > >> > >> David Brewer > >> > >> > > > > > > > > > > > > > > -- Jonathan H. Wage Open Source Software Developer & Evangelist http://www.jwage.com http://www.doctrine-project.org http://www.symfony-project.org --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---
