WordPress.org

Ready to get started?Download WordPress

Forums

Rating-Widget
[resolved] Warning: array_key_exists() [function.array-key-exists] (13 posts)

  1. passiman
    Member
    Posted 1 year ago #

    I am getting this error on sidebar widget

    Warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in \wp-includes\cache.php on line 618

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

  2. vovafeldman
    Member
    Plugin Author

    Posted 1 year ago #

    Hi @passiman,

    The mentioned file, \wp-includes\cache.php isn't part of the Rating-Widget plugin. Why do you think it's related?

  3. passiman
    Member
    Posted 1 year ago #

    Hi Vova

    I am not very good with programming just use the plugins. Buddy what's a solution I do use the wp cache plugin for caching, any alternatives you can suggest please?

    Thanks

  4. vovafeldman
    Member
    Plugin Author

    Posted 1 year ago #

    One simple way to hide the warning is by adding '@' before the method. Just open the file on the specified line, and replace
    array_key_exists with @array_key_exists. That should do the job.

    Note:
    This is not a solution , you should contact the plugin developer to solve this.

    Best!

  5. Jaabie
    Member
    Posted 1 year ago #

    I have a similar error and I do not have any cache plugins activate?

    I did have super-cache and 'DB cache reloaded' installed with my theme but i have them deactivated at present.

    Its odd because the error does not show on every page the widget is on, just some.

  6. vovafeldman
    Member
    Plugin Author

    Posted 1 year ago #

    @Jaabie, as mentioned before, \wp-includes\cache.php have nothing to do with the Rating-Widget plugin.

  7. vgevge
    Member
    Posted 1 year ago #

    I am having the same error exactly.

    The only way to fix it is to disable the Rating-Widget Plugin.

  8. vgevge
    Member
    Posted 1 year ago #

    The error just showed up today. I had never seen it before, no changes were made to my blog, and the error just suddenly showed up on my PHP error log again, and again, and again.

  9. vovafeldman
    Member
    Plugin Author

    Posted 1 year ago #

    @vgevge are you sure the error happens at \wp-includes\cache.php?

  10. vgevge
    Member
    Posted 1 year ago #

    yes
    Warning: array_key_exists() [function.array-key-exists]: The first argument should be either a string or an integer in \wp-includes\cache.php on line 618

    Disabling the cache doesn't fix it.

  11. vovafeldman
    Member
    Plugin Author

    Posted 1 year ago #

    And disabling the Rating-Widget solves this?

  12. vgevge
    Member
    Posted 1 year ago #

    yes

  13. vovafeldman
    Member
    Plugin Author

    Posted 1 year ago #

    That's really strange. There's only one usage of this function in our code, but we are just using it. Honestly, I don't have a clue why this warning pops up, but you can easily work around it by disabling the warnings echo. Just append the following lines to the end of your wp-config.php file:

    error_reporting(E_ERROR);
    ini_set('error_reporting', E_ERROR);
    ini_set('display_errors',false);
    ini_set('html_errors', false);

    Let me know if it resolved the issue.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic