WordPress.org

Ready to get started?Download WordPress

Forums

Google Analytics Dashboard
"has_cap" error in logs (1 post)

  1. Katherine Semel-Munson
    Member
    Posted 11 months ago #

    When in the admin with WP_DEBUG enabled, you will log this error:
    PHP Notice: has_cap was called with an argument that is <strong>deprecated</strong> since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in /cn/runtime/bonappetit/wordpress/wp-includes/functions.php on line 2925

    You can stop this error by updating line 70 in gad-admin-options.php

    add_options_page(__('Google Analytics Dashboard Options'), __('Google Analytics Dashboard'), 8, __FILE__, array(&$this, 'admin_plugin_options'));

    to this:

    add_options_page(__('Google Analytics Dashboard Options'), __('Google Analytics Dashboard'), 'manage_options', __FILE__, array(&$this, 'admin_plugin_options'));

    The error is caused by using a numeric value for the user capabilities instead of a string value.

    http://wordpress.org/plugins/google-analytics-dashboard/

Reply

You must log in to post.

About this Plugin

About this Topic

  • RSS feed for this topic
  • Started 11 months ago by Katherine Semel-Munson
  • This topic is not resolved
  • WordPress version: 3.5.2

Tags

No tags yet.