I'm not used to sf1.2 yet so that I could not tell you anything about tool_dev.php :).
You could try xdebug with eclipse http://devzone.zend.com/article/2930, believe me, after trying this, you should be addicted to the debugger, especially in a language likes php. Otherwise, make, for example an echo on $token and $current_name to see what it returns. On Fri, Sep 25, 2009 at 12:00 PM, DEEPAK BHATIA <toreachdee...@gmail.com>wrote: > Hi, > > I have never used the debugger. I think we need to put the below in the > tool_dev.php file in web directory > > <?php > > define('SF_ROOT_DIR', realpath(dirname(__FILE__).'/..')); > define('SF_APP', 'myapp'); > define('SF_ENVIRONMENT', 'dev'); > define('SF_DEBUG', true); > > require_once(SF_ROOT_DIR.DIRECTORY_SEPARATOR.'apps' > .DIRECTORY_SEPARATOR.SF_APP.DIRECTORY_SEPARATOR.'config' > .DIRECTORY_SEPARATOR.'config.php'); > > sfContext::getInstance()->getController()->dispatch(); > On Fri, Sep 25, 2009 at 3:18 PM, Kieu Anh Tuan <passkey1...@gmail.com>wrote: > >> Hi, >> What do you have in $current_name and $token in your debugger? To me >> EmployeeTablePeer::doSelectOne($c) returns null which means it could not >> find the employee with name = $token. >> I don't think that it will throw an exception when your >> $this->getUser()->getAttribute('allnames') return null because this is >> actually not an exception. Furthermore, it reaches your pink line $val = >> $par_tuple->getEmpId(); so the if condition >> if($this->getUser()->getAttribute('allnames')) must have returned not null. >> >> In my opinion, there're somethings wrong with the $token that Propel could >> not find the right user. >> >> >> >> On Fri, Sep 25, 2009 at 11:33 AM, DEEPAK BHATIA >> <toreachdee...@gmail.com>wrote: >> >>> Hi, >>> >>> Please find the code below >>> >>> >>> =================================================================================== >>> if($this->getUser()->getAttribute('allnames')) >>> { >>> $current_name = $this->getUser()->getAttribute('allnames'); >>> >>> $token = strtok($current_name, ","); >>> $msubject = "Invitation for the meeting-Date:".$startdate." Start >>> Time:".$stime." Room:".$room_tuple->getName(); >>> >>> $c = new Criteria(); >>> $c->add(EmployeeTablePeer::NAME,$token); >>> >>> try >>> { >>> $par_tuple = EmployeeTablePeer::doSelectOne($c); >>> } >>> catch(PropelException $e) >>> { >>> $this->redirect('login/logindberror'); >>> } >>> $val = $par_tuple->getEmpId(); >>> >>> =================================================================================== >>> >>> I get the error for the line above - >>> >>> "Fatal Error: Call to a member function getEmpId() on a non-object in >>> /opt/lampp/htdocs/crb/apps/tool/modules/book/actions/actions.class.php at >>> line 2370 which is the highlighted pink line above. >>> >>> My opinion >>> ======== >>> My point is that session between web browser and server has been broken >>> hence the $this->getUser()->getAttribute('allnames'); is returning a null >>> value but if it is null then we should get PropelException. >>> >>> >>> >> >> >> >> --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---