Quote:
Originally Posted by vaporman87
Thank for that Tango. With your help I was able to get the site running. Though, I am finding some bugs. Here is one error I encountered and it's respective code:
Code:
Fatal error: Call to undefined method stdClass::update() in /home/vaporman/public_html/protected/controllers/SiteController.php on line 1231
PHP Code:
Yii::app()->user->setFlash('msgError','Sorry, your reply could not be posted. Please try again.');
}
}
else
{
$forum->views+=1;
$forum->update();
}
$cat = ForumCategory::model()->findByPk($forum['category_id']);
$forum->update(); is line 1231. Any thoughts, or need more info?
This error occurs when a user is logged in to my site and views a forum thread, then clicks the "RetroDaze" logo to return to the home page.
The site is located here: www.retro-daze.com
|
Can't help with the actual fix for this error since we don't know where or how its created, but the error itself is quite simple. $forum has been declared as a type stdclass (
$forum = new stdclass()), but it is attempting to call a method for stdclass::update which will never exist (stdclass has no method update and PHP doesn't allow a way to trait into a stdclass object [at least I don't think it does]). So the issue is simply that $forum is not of the correct datatype. Why it isn't is unknown; for that you need to determine the creation sequence for the $forum variable and have it created as the correct type (maybe of a new Forum datatype?).
As for the above couple posts, love the randomness. I don't use any boxed CMS, but even I know that Joomla and Yii are different beasts.