Hello, call_user_func is used to call functions dynamically. However, you are calling a class constant. So, you must use the constant() function: $c->getNewCriterion(constant($peer_class.'::'.$field), $branchId);
On 10/24/07, Jon Busby <[EMAIL PROTECTED]> wrote: > > > Hi everyone, > > I may just be being stupid here, but I'm trying to create dynamic > criteria calls and I'm getting an error > > $cton = $c->getNewCriterion(call_user_func(array($peer_class, $field)), > $branchId); > > yet I'm getting > " > *Warning*: call_user_func(LogPeer::BRANCH_ID) [function.call-user-func > <http://agenda-dev.jbtwo.com/backend_dev.php/stats/function.call-user-func > >]: > First argument is expected to be a valid callback in" > > This should work.... any ideas? > > Jon > > > > > -- Noël GUILBERT http://www.sensiolabs.com http://www.symfony-project.com Sensio Labs Tél: +33 1 40 99 80 80 --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
