HI!!

I have this on my lib/model/Audiencia.php

class Audiencia extends BaseAudiencia
{
.....
  /* CREAR UNA AUDIENCIA*/
   public static function crearAudiencia($denuncia_id, $con)
   {
           $denuncia = DenunciaPeer::retrieveByPk( $denuncia_id );
           $audiencia = new Audiencia();
           //DATOS//
           $audiencia->setDenunciaId( $denuncia->getId() );

$audiencia->setOrdenado( 
sfContext::getInstance()->getUser()->getEmpleadoUsuario('id') );

$audiencia->setCorrelativo( Audiencia::obtenerCorrelativo() );
           $audiencia->setDenunciadoId( $denuncia->getDenunciadoId() );

$audiencia->setTipoProcesoId( 
TipoProcesoPeer::obtenerPorNombre('denuncia')->getId() );

$audiencia->setDenuncianteId( $denuncia->getDenuncianteId() );
           $audiencia->setFechaCita( date('Y-m-d') );
           $audiencia->setHoraCita( date('H:m:i') );

           $audiencia->save($con);
    }
.....



But this error comes out:

Fatal error: Call to a member function getId() on a non-object
in /home/germana/www/indepabis/lib/model/Audiencia.php on line 60


This is where i call this function:

class ConciliacionForm extends BaseConciliacionForm
{
  ..............
  protected function doSave($con = null)
  {
    ..................
    if( $this->getObject()->getStatus() == false )
    {
        $denuncia_id = $this->getObject()->getDenunciaId();
        $this->remitirConciliacion($denuncia_id, $con);
    }
  }

  public function remitirConciliacion( $denuncia_id, $con)
  {
      if( ConciliacionPeer::contarPorDenuncia( $denuncia_id ) >= 3 )
      {

      }
      else {
         Audiencia::crearAudiencia( $denuncia_id, $con );
      }
  }

}




-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to