Support

Account

Home Forums General Issues Warning: strpos() expects parameter 1 to be string

Unread

Warning: strpos() expects parameter 1 to be string

  • Having a similar issue as http://support.advancedcustomfields.com/forums/topic/get_fields-breaking-after-upgrade-to-acf-pro-on-repeater-field/

    As part of a hook to user_register, a custom post type, with an ACF field of type number (no repeaters), is being loaded.

    get_field(‘field_name’, post_id)

    I have tried changing field type, and giving field key instead. Same result.

    Error:
    Warning: strpos() expects parameter 1 to be string, array given in wp-content\plugins\advanced-custom-fields\core\api.php on line 40

    Call Stack
    # Time Memory Function Location
    1 0.0024 689784 {main}( ) ..\wp-login.php:0
    2 0.4116 43876840 register_new_user( ) ..\wp-login.php:685
    3 0.4153 43876872 wp_create_user( ) ..\user.php:2177
    4 0.4153 43877832 wp_insert_user( ) ..\user.php:1964
    5 0.4692 43967336 do_action( ) ..\user.php:1867
    6 0.4692 43968296 call_user_func_array:{wp-includes\plugin.php:505} ( ) ..\plugin.php:505
    7 0.4693 43968312 pluginname_registration_save( ) ..\plugin.php:505
    8 0.5371 44005624 get_field( ) ..\users.php:121
    9 0.5371 44005952 get_field_object( ) ..\api.php:214
    10 0.5371 44006784 get_field_reference( ) ..\api.php:271
    11 0.5372 44006976 strpos ( ) ..\api.php:40

    Version of WP: 4.0
    Version of ACF: 4.3.9

Viewing 1 post (of 1 total)

The topic ‘Warning: strpos() expects parameter 1 to be string’ is closed to new replies.