Afeique Sheikh
Mon Feb 13 20:30:05 -0500 2012
I just found out I had another class named "tag" which I presume is what php activerecord was picking up on. This is what I get for making helper functions to instantiate classes instead of using the full name.
I'm going to go stab myself now, then keep programming.
(1-1/1)
Subject: (SOLVED) Exception: 'Tag' must extend from ActiveRecord\Model' though it already does
Hi guys,
I have stumbled into a surprising issue. Trying to fetch posts (MySQL v5.1.49; PHP v5.3; PHP ActiveRecord v1.0) like so:
results in:
But class Tag definitely extends ActiveRecord\Model:
models/post.php
models/tag.php
models/post_tag_relation.php
Changing the Post class to
makes everything work out okay, but this isn't the sort of solution I'm looking for.
I feel like I'm messing up something simple, but no amount of digging has yet come to any avail. As ever, any input would be appreciated.