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

  1. TimBHowe
    Posted 3 years ago #

    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


  2. elliotcondon
    Plugin Author

    Posted 3 years ago #

    Thanks for the bug report.

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Advanced Custom Fields
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic