Hey, thanks for letting me know.
I just noticed the version tags on the thread, that’s a neat additional. I will tag the ACF version in any future threads.
I was originally getting the same error as in the first post in this thread, now I am getting a different error with the same cause:
Fatal error: Cannot use string offset as an array in SERVERURLHERE/wp-content/plugins/advanced-custom-fields-pro/api/api-template.php on line 580
However, this error is a fatal error and immediately stops the page drawing whereas before it was simply a warning.
Thank you for the response.
Unfortunately I can’t seem to get the error to go away. Maybe I’m mis-understanding what you mean by ‘offending post’?
I am getting the error in various places on the website I’m working on right now:
At this point I’ve updated every page on my site and the error persists.
Any thoughts much appreciated.
Ohhh array_merge() and array_unique(), of course. Here I am looking for WordPress / ACF functions to do the job when vanilla php functions were the answer.
Thank you so much, that solved the problem perfectly.
I’m also having this issue and can’t figure out how to roll back to 5.0.7, what am I missing?
EDIT: nevermind, I figured out what the issue is and will work around it for now.
ISSUE: For those that are curious, the issue arises if you select an image with original dimensions that are smaller than the ‘Preview Size’ size you’ve set.
By default when you create an Image ACF field, the ‘Preview Size’ will be the default WordPress 150×150 ‘Thumbnail’ size. The image I was trying to select was 140×140 and ACF was struggling to find the preview image to display so it just spat out the error.
I fixed it by going back to my ACF panel and selecting my custom image size for the ‘Preview Size’, and it works just fine.
Obviously this isn’t ideal, and should be fixed in 5.0.9 but for anyone looking to avoid rolling back their ACF version and keep working in the meantime I suggest just telling ACF to use a really small ‘Preview Size’.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.