Support

Account

Home Forums Bug Reports PHP Warning: array_search() expects parameter 2 to be array taxonomy.php:370

Solving

PHP Warning: array_search() expects parameter 2 to be array taxonomy.php:370

  • With the most recent version 5.3.4 I’m getting this warning:

    array_search() expects parameter 2 to be array, integer given in advanced-custom-fields-pro/fields/taxonomy.php:370

    The warning appears when I return the term id as the value instead of the entire object. Reverting to 5.3.3.2 solves the issue.

  • Having the same issue here. Error is there whether I use Term Object of Term ID as the return value.

    ACF 5.3.4
    WP 4.4.2

  • I’ve reported this to the developer.

  • Hi guys

    Sorry about this PHP Error.
    I’ve found and fixed the issue. Can you please re-download 5.3.4 from your account page and update the plugin files?

    The only changes are to:
    api/api-helpers.php
    fields/taxonomy.php

    Thanks
    E

  • Thanks Elliot.

    The update is working for me.

    Much appreciated.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.