Author Topic: 1.5 RC: Fatal error: Call to a member function get...  (Read 4724 times)

Karl

  • Sr. Member
  • ****
  • Posts: 339
    • ICQ Messenger - 464979879
    • View Profile
1.5 RC: Fatal error: Call to a member function get...
« on: July 11, 2009, 10:36:47 pm »
1.5 beta3:

After opening a task:

Fatal error: Call to a member function getId() on a non-object in /home/.../application/models/comments/Comment.class.php on line 188

Maybe it's again because of a deleted user.
« Last Edit: July 17, 2009, 08:30:40 pm by Karl »

ignacio

  • Hero Member
  • *****
  • Posts: 1703
    • View Profile
Re: 1.5 beta3: Fatal error: Call to a member function getId()...
« Reply #1 on: July 13, 2009, 05:55:01 pm »
Hi Karl,

To fix it change line 188 of 'application/models/comments/Comment.php' to:

Code: [Select]
$creatorId = $this->getCreatedById();

Karl

  • Sr. Member
  • ****
  • Posts: 339
    • ICQ Messenger - 464979879
    • View Profile
Re: 1.5 beta3: Fatal error: Call to a member function getId()...
« Reply #2 on: July 14, 2009, 03:31:02 am »
Thanks.

This works.

Karl

  • Sr. Member
  • ****
  • Posts: 339
    • ICQ Messenger - 464979879
    • View Profile
New: 1.5 RC: Fatal error: Call to a member function get...
« Reply #3 on: July 17, 2009, 07:25:39 pm »
Got another error like this:

Fatal error: Call to a member function getCardUrl() on a non-object in /home/.../application/views/timeslot/object_timeslots.php on line 37
« Last Edit: July 17, 2009, 08:29:49 pm by Karl »

alvarotm01

  • Administrator
  • Sr. Member
  • *****
  • Posts: 335
    • View Profile
    • Email
Re: 1.5 RC: Fatal error: Call to a member function get...
« Reply #4 on: July 22, 2009, 12:00:46 pm »
Hi Karl,

try replacing the line 37 of "/application/views/timeslot/object_timeslots.php" with this code:
Code: [Select]
<?php if ($timeslot->getUser() instanceof User) { ?>
<td style="padding-right:10px"><b><a class="internalLink" href="<?php echo $timeslot->getUser()->getCardUrl()?>" title=" <?php echo lang('user card of'clean($timeslot->getUser()->getDisplayName())) ?>"><?php echo clean($timeslot->getUser()->getDisplayName()) ?></a></b></td>
<?php } else {?>
<td style="padding-right:10px"><b><?php echo lang("n/a"?></b></td>
<?php ?>
« Last Edit: July 22, 2009, 12:02:37 pm by alvarotm01 »

Karl

  • Sr. Member
  • ****
  • Posts: 339
    • ICQ Messenger - 464979879
    • View Profile
Re: 1.5 RC: Fatal error: Call to a member function get...
« Reply #5 on: July 22, 2009, 06:43:51 pm »
Thank you very much.