Closed GoogleCodeExporter closed 8 years ago
I downloaded a fresh copy of the PHP and made the changes above and received the
following error.
Fatal error: Cannot use object of type TV_Show as array in
/home/*/public_html/test2/test.php on line 8
test.php
6 $tvShows = TV_Shows::findById(76290);
8 $tvShow = $tvShows[0];
Original comment by Iveo...@gmail.com
on 24 Mar 2009 at 12:32
I don't have that test file, but FindById should only return one TV_Show
object, not
an array of TV_Show objects.
Original comment by senorsma...@gmail.com
on 24 Mar 2009 at 7:36
try this instead
$tvShow = TV_Shows::findById(76290);
Original comment by senorsma...@gmail.com
on 24 Mar 2009 at 7:37
changing that gives me
Fatal error: Call to a member function getEpisode() on a non-object in
/home/usenettv/public_html/test/test.php on line 17
I have attached the test file. It's mainly the example from Ryan's test site.
This used to work beautifully lol
Original comment by Iveo...@gmail.com
on 24 Mar 2009 at 11:31
Attachments:
try deleting this line
$tvShow = $tvShows[0];
Original comment by senorsma...@gmail.com
on 25 Mar 2009 at 12:29
That's working perfectly now!
Although....
Now for some reason $tvShow->dayOfWeek no longer brings up a value. Is this a
side
effect of the changes TheTVDB have made?
Original comment by Iveo...@gmail.com
on 25 Mar 2009 at 10:41
Found the problem.
TV_Show.class.php
Before change:
public $dayOfWeek;
$this->daysOfWeek = (string)$config->Airs_DayOfWeek;
Change to:
public $dayOfWeek;
$this->dayOfWeek = (string)$config->Airs_DayOfWeek;
That fixes it fine.
Is it possible for the community to rewrite some of this code now we've made
changes?
Original comment by Iveo...@gmail.com
on 25 Mar 2009 at 10:45
Hi, I just found out that people are filing issues, I wasn't receiving any
emails.
I'll look into this problem.
Original comment by ryan.doherty
on 27 Mar 2009 at 5:13
I've updated some code in 1.0.2, which is available for download. Included
dayOfWeek
fix and new url for tv show information.
Original comment by ryan.doherty
on 27 Mar 2009 at 7:27
Original issue reported on code.google.com by
senorsma...@gmail.com
on 24 Mar 2009 at 12:38