WordPress.org

Ready to get started?Download WordPress

Forums

Advanced Custom Fields
[resolved] Page link field error after updating 4.1.2 to 4.1.3 (2 posts)

  1. TimBHowe
    Member
    Posted 1 year ago #

    Hello,
    After updating from 4.1.2 to 4.1.3 I recieved the following errors on the page edit screen for the Page Link fields:

    Warning: in_array() expects parameter 2 to be array, null given in /wp-content/plugins/advanced-custom-fields/core/fields/post_object.php on line 114

    Warning: Invalid argument supplied for foreach() in /wp-content/plugins/advanced-custom-fields/core/fields/post_object.php on line 120

    I tested the Page field both in and out site of a repeater field and was getting the same error.

    It would appear in the $field['taxonomy'] value is not an array. So to resolve the issue I modified the following lines
    /advanced-custom-fields/core/fields/post_object.php on line 114
    if( ! in_array('all', (array) $field['taxonomy']) )
    /advanced-custom-fields/core/fields/post_object.php on line 120
    foreach( (array) $field['taxonomy'] as $v )

    Not sure if this is the best solution but it resolved the issue for me.

    Hope this helps
    Thanks
    Tim

    http://wordpress.org/extend/plugins/advanced-custom-fields/

  2. elliotcondon
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for the bug report.

    This has been fixed, pushed to github and will soon be released onto WP.org

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic