{"id":7434318,"date":"2016-05-31T17:35:07","date_gmt":"2016-05-31T17:35:07","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/phpinfo-plugin-throwing-deprecated-notice\/"},"modified":"2016-08-31T18:36:31","modified_gmt":"2016-08-31T18:36:31","slug":"phpinfo-plugin-throwing-deprecated-notice","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/phpinfo-plugin-throwing-deprecated-notice\/","title":{"rendered":"phpinfo plugin throwing deprecated notice"},"content":{"rendered":"<p>I am getting this notice when I have this plugin active and debugging turned on:<\/p>\n<p><code>Notice: has_cap was called with an argument that is deprecated since version 2.0! Usage of user levels by plugins and themes is deprecated. Use roles and capabilities instead. in \/home\/bitnami\/wordpress\/wp-includes\/functions.php on line 3844<\/code><\/p>\n<p>I traced this to the use of <code>10<\/code> for a user capability in the plugin. I can eliminate this warning if I replace line 21 with the following:<\/p>\n<p><code>add_options_page(&#039;Phpinfo&#039;, &#039;Phpinfo&#039;, &#039;edit_dashboard&#039;, __FILE__, &#039;dprx_phpinfo_manage_page&#039;);<\/code><\/p>\n<p>Maybe you would consider an update to the plugin with this fix?<\/p>\n<p>https:\/\/wordpress.org\/plugins\/phpinfo\/<\/p>\n","protected":false},"template":"","class_list":["post-7434318","topic","type-topic","status-publish","hentry","topic-tag-deprecated"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/7434318","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/7434318\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=7434318"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}