WordPress.org

Ready to get started?Download WordPress

Forums

Rating-Widget: Star Rating System
[resolved] [Plugin: Rating-Widget] Warning: array_key_exists(): The first argument should be either a string or (2 posts)

  1. soularcangel
    Member
    Posted 1 year ago #

    I have installed Rating-Widget Plugin 1.4.6 on WordPress 3.4.1, but when I active the Rating Widger Top Rated, I have this error:

    Warning: array_key_exists(): The first argument should be either a string or an integer in /web/htdocs/www.***.it/wp-includes/cache.php on line 537

    The problem is into file rating-widget.php to line 3757, I have this:

    case "comments":
         $id = RatingWidgetPlugin::Urid2CommentId($urid);
         $comment = get_comment($id);
         $title = trim(strip_tags($comment->comment_content));
         $permalink = get_permalink($comment->comment_post_ID) . '#comment-' . $comment->comment_ID;
      break;

    and I have solved the error adding "(int)" function on $id ...

    case "comments":
         $id = (int)RatingWidgetPlugin::Urid2CommentId($urid);
         $comment = get_comment($id);
         $title = trim(strip_tags($comment->comment_content));
         $permalink = get_permalink($comment->comment_post_ID) . '#comment-' . $comment->comment_ID;
      break;

    http://wordpress.org/extend/plugins/rating-widget/

  2. vovafeldman
    Member
    Plugin Author

    Posted 1 year ago #

    thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags