Support » Plugins and Hacks » [Resolved] foreach() error in 2.2.3 update

[Resolved] foreach() error in 2.2.3 update

Viewing 15 replies - 1 through 15 (of 32 total)
  • Just updated and also getting that error.

    Same error.

    Also, something to do with nivo slider

    Warning: Invalid argument supplied for foreach() in wp-content/plugins/jetpack/jetpack.php on line 4534

    Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at .../wp-content/plugins/jetpack/jetpack.php:4534) in /home/content/35/8355835/html/wp-content/plugins/nivo-slider/nivo-slider.php on line 10

    And also this when click I on sharedaddy settings:

    Warning: Cannot modify header information – headers already sent by (output started at /home/username/public_html/wp-content/plugins/jetpack/jetpack.php:4534) in /home/username/public_html/wp-includes/pluggable.php on line 876

    Yes I am getting the same message after updating. I’m going to have to revert back. Please get this fixed asap.

    Thank you.


    For a temporary fix, if you don’t want to roll back to 2.2.2 and you are comfortable editing the plugin. At the end of the jetpack.php file, comment out the following lines:

    if ( function_exists( 'bbpress' ) )
    	$_jetpack_rest_api_compat_includes = dirname( __FILE__ ) . '/class.jetpack-bbpress-json-api-compat.php';

    and that will get rid of the error if bbpress if your only issue.
    You can comment out the foreach loop at the end as well if you are getting other problems.

    Plugin Contributor designsimply


    Thanks for reporting this. I haven’t been able to reproduce the error so far myself, but we’re looking into it.

    Plugin Contributor designsimply


    @probablynot, instead of commenting out those two lines, can you try updating to this instead?

    $_jetpack_rest_api_compat_includes = array( dirname( __FILE__ ) . '/class.jetpack-bbpress-json-api-compat.php' );

    (props cfinke for the code)

    Same here. I just rolled back to 2.2.2. Is it a compatibility problem with bbpress?

    Just updated to jetpack 2.2.3 and just got this message on my site Warning: Invalid argument supplied for foreach() in /plugins/jetpack/jetpack.php on line 4534 2.2.2 worked ok don’t know what happened after the update!

    @designsimply with that line in place, the code no longer errors.



    Automattic Happiness Engineer

    @designsimply, thanks for the point to this thread and for the solution. I made the change and all is well again.

    Plugin Contributor designsimply


    Glad to hear it worked! I’m not sure if that will be the final fix, but it seems to be a good stopgap for now. The plugin devs will probably post an update about it once they get it sorted out.

    Plugin Contributor designsimply


    I spotted a changeset related to this bug at http://plugins.trac.wordpress.org/changeset/704351/jetpack/trunk

    A new point release might follow, so affected users (those using bbPress and Jetpack together) should stay tuned.

    Worked for me too.


Viewing 15 replies - 1 through 15 (of 32 total)
  • The topic ‘[Resolved] foreach() error in 2.2.3 update’ is closed to new replies.