eddieajau / artof-comments

A Joomla plugin that provides Discus support for articles.
2 stars 1 forks source link

Context: com_tags.tag. Notice: Undefined property: stdClass::$id #1

Open vdespa opened 11 years ago

vdespa commented 11 years ago

When a menu item with tags is defined and accessed the following PHP warning appears:

Notice: Undefined property: stdClass::$id in \plugins\content\artofcomments\artofcomments.php on line 149

Id in this case is NULL.

vdespa commented 11 years ago

If fixed this with something like:

    if (property_exists($article, "id"))
        $enabledKey = $context . '-' . (int) $article->id;
    else
        $enabledKey = -1;

Let me know if I should submit a PR.