Generally this is beacuse your are giving an object of value instead of a 
criteria.


----- Message d'origine ----
De : "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
À : symfony users <symfony-users@googlegroups.com>
Envoyé le : Mercredi, 16 Avril 2008, 18h31mn 00s
Objet : [symfony-users] Call to peer method causing blank screen


Even in dev

    public static function doReports(Criteria $criteria, $con = null)
    {
        $weeks = array();
        foreach (sfContext::getInstance()->getUser()->getMonthObj()-
>getWeeksOfMonth() as $week) {
                $weeks[] = $week->firstDayOfWeek();
        }
        $criteria->addAsColumn('logcount',
'COUNT('.ActivitylogPeer::ID.')' );
        $criteria->add(ActivitylogPeer::CONSUMER_ID, self::ID,
Criteria::LEFT_JOIN );


        $criteria->addAnd(ActivitylogPeer::STARTDATE, $weeks,
Criteria::IN );
        $criteria->addGroupByColumn(self::ID );
        $criteria->addHaving('logcount', '0', Criteria::GREATER_THAN );

        if (sfContext::getInstance()->getUser()->getProgramId() &&
(sfContext::getInstance()->getUser()->getProgramId() > 0)) {
            $criteria->addAnd(self::PROGRAM_ID, sfContext::getInstance()-
>getUser()->getProgramId());
        }


      return parent::doSelect($criteria, $con);

the action is:
  public function executeIndex()
  {
        $this->getUser()->setAttribute('year',  $this-
>hasRequestParameter('year') ? $this->getRequestParameter('year') :
date('Y'));
        $this->getUser()->setAttribute('month', $this-
>hasRequestParameter('month') ? $this->getRequestParameter('month') :
date('m'));
        $c = new Criteria();
        $this->hasRequestParameter('consumer_id') ? $c-
>add(ConsumerPeer::ID, $this->getRequestParameter('consumer_id')) :
null;
        $this->consumers = ConsumerPeer::doReports($c);





  }



      
_____________________________________________________________________________ 
Envoyez avec Yahoo! Mail. Une boite mail plus intelligente http://mail.yahoo.fr

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to