getNbResults()) : ?> getResults() as $offer) : ?> getMOVIE()->getTitle(); ?>
while running this success page i am getting the following error: Fatal error: Call to a member
function getTitle() on a non-object in
C:\xampp\htdocs\Menakaa\TicketBounty\dev\apps\backend\modules\offer\templates\searchOfferSuccess.php on line 68
Asked
Active
Viewed 69 times
-2

Steve Benett
- 12,843
- 7
- 59
- 79

Mena
- 1
-
That means `$offer->getMovie()` does not return an object. Check your `Offer` object at method `getMovie` to see what can be wrong. You can also check with `var_dump($offer->getMovie())` and see what is returned - I assume Null. Then, just make a test before calling the method. `if ($offer->getMovie()) { echo $offer->getMovie()->getTitle(); }` – Touki Sep 23 '13 at 08:54
1 Answers
0
Try to close foreach
loop. at this time this loop is accepting only first line.

keshu_vats
- 452
- 6
- 45