WordPress.org

Forums

Cute Profiles
PHP Warning: Invalid argument supplied for foreach() (1 post)

  1. Wykydtron
    Member
    Posted 1 year ago #

    Edit: 3/27/2015 Looking good on 4.1.1!!!

    ------- previous review -------

    error_log reads

    [08-May-2014 04:26:46 UTC] PHP Warning:  Invalid argument supplied for foreach() in /home/ponyo/public_html/wp-content/plugins/cute-profiles/processors/cute_1.php on line 25
    [08-May-2014 04:26:46 UTC] PHP Warning:  Invalid argument supplied for foreach() in /home/ponyo/public_html/wp-content/plugins/cute-profiles/processors/cute_1.php on line 160
    [08-May-2014 04:26:46 UTC] PHP Warning:  Invalid argument supplied for foreach() in /home/ponyo/public_html/wp-content/plugins/cute-profiles/processors/cute_1.php on line 187

    I am getting a massive error_log from these errors. This plugin seems to be very popular on my instance. This is very annoying, here's a possible solution.

    Line 25, 160, 187

    in foreach check if array.

    foreach ((array) $cute_profiles_network as $key=>$value) {

    add (array) to each foreach, upload, profit. Errors go away.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Cute Profiles
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.