Home Forums Bug Reports Icon Picker field required $attachment_id


Icon Picker field required $attachment_id

  • Hi,

    I found a new bug for the Icon Picker field. In our theme we have a filter on the wp_get_attachment_image_url function.

    When no image is selected, the value of $field[‘value’][‘value’] is NULL on line 169 of class-acf-field-icon_picker.php

    											$img_url = wp_get_attachment_image_url( $field['value']['value'], 'thumbnail' );
    											// If the type is media_library, then we need to show the media library preview.

    In our theme we have set $attachment_id as a required int. And therefor we get an critical error.

    Is this a bug on your end, or do we need to allow also NULL for $attachment_id?

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.