Support » Fixing WordPress » Invalid argument supplied for foreach() in /wp-includes/functions.php ln 1161

  • Resolved uno

    (@uno)


    Warning: Invalid argument supplied for foreach() in *edited*/wp-includes/functions.php on line 1161

    I’m currently getting this error on one of my websites that I ported over (or tried to anyway) from pMachine. Is there a fix for this?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Mark (podz)

    (@podz)

    Support Maven

    Do you have any categories ?
    Do you have any posts ?

    I’m getting the same error all over the place. This is a brand new install. I’m using php 4.4.1 and mysql 5.

    in addition to the above error, i’m also getting the following error under the categories heading on the main page.

    Warning: Invalid argument supplied for foreach() in C:\website\wordpress\wp-includes\template-functions-category.php on line 311

    Same goes for me,I’m getting the same error all over the place. This is a brand new install. I’m using php 4.4.1 and mysql 5.

    in addition to the above error, i’m also getting the following error under the categories heading on the main page.

    Warning: Invalid argument supplied for foreach() in C:\website\wordpress\wp-includes\template-functions-category.php on line 311

    Anyone know a fix?

    I have the same thing on my Windows box with PHP5 and MySQL 5.

    [client 145.97.221.97] PHP Warning: Invalid argument supplied for foreach() in D:\\srv\\http\\wordpress\\wp-includes\\functions.php on line 1161, referer: http://blog.onzin.org/
    [client 145.97.221.97] PHP Warning: Invalid argument supplied for foreach() in D:\\srv\\http\\wordpress\\wp-includes\\functions.php on line 1161, referer: http://blog.onzin.org/wp-admin/
    [client 145.97.221.97] PHP Warning: Invalid argument supplied for foreach() in D:\\srv\\http\\wordpress\\wp-includes\\functions.php on line 1161, referer: http://blog.onzin.org/wp-admin/
    [client 145.97.221.97] PHP Warning: Invalid argument supplied for foreach() in D:\\srv\\http\\wordpress\\wp-admin\\edit.php on line 102, referer: http://blog.onzin.org/wp-admin/
    [client 145.97.221.97] PHP Warning: Invalid argument supplied for foreach() in D:\\srv\\http\\wordpress\\wp-includes\\functions.php on line 1161, referer: http://blog.onzin.org/wp-admin/edit.php
    [client 145.97.221.97] PHP Warning: Invalid argument supplied for foreach() in D:\\srv\\http\\wordpress\\wp-includes\\functions.php on line 1161, referer: http://blog.onzin.org/wp-admin/link-manager.php
    [client 145.97.221.97] PHP Warning: Invalid argument supplied for foreach() in D:\\srv\\http\\wordpress\\wp-includes\\functions.php on line 1161, referer: http://blog.onzin.org/wp-admin/themes.php
    [client 145.97.221.97] PHP Warning: Invalid argument supplied for foreach() in D:\\srv\\http\\wordpress\\wp-includes\\functions.php on line 1161, referer: http://blog.onzin.org/wp-admin/plugins.php
    [client 145.97.221.97] PHP Warning: Invalid argument supplied for foreach() in D:\\srv\\http\\wordpress\\wp-includes\\functions.php on line 1161, referer: http://blog.onzin.org/wp-admin/profile.php
    [client 145.97.221.97] PHP Warning: Invalid argument supplied for foreach() in D:\\srv\\http\\wordpress\\wp-includes\\functions.php on line 1161, referer: http://blog.onzin.org/wp-admin/options-general.php
    [client 145.97.221.97] PHP Warning: Invalid argument supplied for foreach() in D:\\srv\\http\\wordpress\\wp-includes\\functions.php on line 1161, referer: http://blog.onzin.org/wp-admin/options-general.php
    [client 145.97.221.97] PHP Warning: Invalid argument supplied for foreach() in D:\\srv\\http\\wordpress\\wp-includes\\functions.php on line 1161, referer: http://blog.onzin.org/wp-admin/options-general.php?updated=true
    [client 145.97.221.97] PHP Warning: Invalid argument supplied for foreach() in D:\\srv\\http\\wordpress\\wp-includes\\functions.php on line 1161, referer: http://blog.onzin.org/wp-admin/post.php
    [client 145.97.221.97] PHP Warning: Invalid argument supplied for foreach() in D:\\srv\\http\\wordpress\\wp-includes\\functions.php on line 1161, referer: http://blog.onzin.org/wp-admin/post.php
    [client 145.97.221.97] PHP Warning: Invalid argument supplied for foreach() in D:\\srv\\http\\wordpress\\wp-admin\\edit.php on line 102, referer: http://blog.onzin.org/wp-admin/post.php

    im getting the same error on a fresh install

    I did a search in the forum and found a bunch of similar errors. This topic http://wordpress.org/support/topic/21249 seems to have a solution. However, you say you edited the functions.php. What did it look like before you edited it? Compare before and after. That may help, too.

    billychow

    (@billychow)

    I’ve readed that all solutions you given.
    but it still cannot work well.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Invalid argument supplied for foreach() in /wp-includes/functions.php ln 1161’ is closed to new replies.