acf-extended / ACF-Extended

🚀 All-in-one enhancement suite that improves WordPress & Advanced Custom Fields
https://www.acf-extended.com
239 stars 28 forks source link

Revisions bug #101

Closed asha23 closed 2 years ago

asha23 commented 2 years ago

Describe the bug Error when updating revisions

To Reproduce Click on a revision in a post or page

Expected behavior Revisions page should load without error

Screenshots Notice: Trying to access array offset on value of type bool in wp-content/plugins/advanced-custom-fields-pro/includes/revisions.php on line 285

WordPress & ACF WordPress version: Latest ACF Pro version: Latest ACF add-ons: None

This can be fixed by adding the following to line 276 in includes/revisions.php

if(is_array($field)) {
    if ( $field['type'] == 'image' || $field['type'] == 'file' ) {
        $url   = wp_get_attachment_url( $value );
        $value = $value . ' (' . $url . ')';
    }
}
acf-extended commented 2 years ago

Hello,

Thanks for the feedback!

Unfortunately this look like an issue with ACF and not ACF Extended (this plugin). I would recommend to report the bug on the ACF Github here.

Hope it helps!

Have a nice day!

Regards.