WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: Posts 2 Posts] PHP Warning with WP_DEBUG On

[Resolved] [Plugin: Posts 2 Posts] PHP Warning with WP_DEBUG On

  • Warning: Invalid argument supplied for foreach() in [...]/wp-content/plugins/posts-to-posts/core/type.php on line 51

    Adding the following to the expand_fields() method on a new line fixes this PHP warning.

    private function expand_fields( $fields ) {
    	if(!is_array($fields)) { return array(); } // New code
    	foreach ( $fields as &$field_args )

    Please add this fix in the next release. Thanks!

    http://wordpress.org/extend/plugins/posts-to-posts/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] [Plugin: Posts 2 Posts] PHP Warning with WP_DEBUG On’ is closed to new replies.