wordpress-premium / advanced-custom-fields-pro

ACF PRO includes extra fields & features to better develop websites including repeatable fields, page building tools, media galleries, custom options pages and more.
https://gitlab.com/wordpress-premium/advanced-custom-fields-pro
128 stars 27 forks source link

link field type array url may not be set #1

Closed ohiowebpro closed 5 months ago

ohiowebpro commented 5 months ago

When using a Link field type in a custom block, I am getting a warning on the admin page block builder: Warning: Undefined array key "url" in /var/www/html/wp-content/plugins/advanced-custom-fields-pro/includes/api/api-helpers.php on line 2871

I can update the line to fix using: $use_path = isset($attachment['filename']) ? $attachment['filename'] : (isset($attachment['url']) ? $attachment['url'] : '');

Instead of $use_path = isset( $attachment['filename'] ) ? $attachment['filename'] : $attachment['url'];

All plugins and wordpress are up to date. I am using Roots Sage for the theme development and using ACF method for custom blocks.

thaikolja commented 5 months ago

If you use Sage, do you also use Bedrock and install the plugin via PHP Composer?