• When I go to my Cystats page (I just installed it this afternoon), I see the first 5 sets of stats (through ‘this year’s visits), and then I get the following error message:

    Warning: Invalid argument supplied for foreach() in /hsphere/local/home/username/trowbridgefamily.net/WP/wp-content/plugins/cystats/includes/view.class.php on line 516

    Any idea what might be causing this?

Viewing 6 replies - 1 through 6 (of 6 total)
  • I have the same issue;

    Warning: Invalid argument supplied for foreach()in /home/…../wp-content/plugins/cystats/includes/view.class.php on line 516

    so I’m also seeking a solution

    Hello.
    I’m the author of cystats.

    Bug 1: CyStats does not check if data array is filled with data before entering the display loop so you get this error message. I will fix that and inform you in this thread about the uploaded fixed version.

    But: The message also means that the array of stored single-hit-data in the database table yourprefix_TABLE_STATISTICS_RAW is empty. The table should be filled with at least one entry from the installer.

    – What WP version do you use?
    – If possible – can you look into phpmyadmin (or similar) if the table really is empty?
    – On CyStats->Clients: Do you receive data about browsers, os,… or empty tables/error messages?

    Greets
    Cy

    Array-check-fix is online along with some new features of the developement version:
    http://wordpress.org/extend/plugins/cystats/download/ via ‘Developement version’.

    What remains is that this database table definately should not be empty…

    I was having this same problem too. I’ve downloaded the patch V0.8.8, installed it and activated it.

    I get (on the CyStats Options page):
    CyStats visits table entries: 0
    CyStats first database entry: 01.01.1970, 00:00
    CyStats visits table last cleanup: December 31, 1969 5:00 pm

    wp_TABLE_STATISTICS_RAW and WP_TABLE_STATISTICS both exist and are BOTH EMPTY. ???

    Of course, there is no logging info either.
    Any suggestions?

    Hrmpf. I should definately look into this forums more often, sorry. This evening I’ll try to track down this bug using a clean 2.3.1 install on my localhost. I still have no idea why the tables are empty.

    Question – does cystats work properly as soon as you have called some blog page 1 or 2 times ? This has been reported by another user. As soon as the first entries went into the database everything was fine.

    Released 0.8.9, should be in WordPress plugins svn in a few minutes, maybe the error was a wrong variable initialization like mentioned in this thread.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Invalid argument error’ is closed to new replies.