Thank you, John.
All your information and solutions are very helpful.
Much appreciated!
I don’t necessarily expect it to exist.
That might be a misunderstanding on my part.
I assumed it worked like delete_post_meta().
…”Delete if it’s there. Move along if not.”
Thanks, John.
In my case, the error is only on the delete_field();
I can confirm that 5.9.1… and, after an upgrade to 5.9.3, I’m getting a similar error.
Code is pretty simple:
// all other meta
if ( ! empty( $value ) ) {
update_field( $wp_postmeta, $value, $post_id );
} else {
delete_field( $wp_postmeta, $post_id );
}
Errors reported:
PHP Notice: Trying to access array offset on value of type bool in [local install]/wp-content/plugins/advanced-custom-fields-pro/includes/acf-value-functions.php on line 279
The field ( $wp_postmeta ) exists and has an ACF field key.
Not sure where to go from here except converting it to delete_post_meta();.
Apologies… somehow my comment posted twice.
*big big.
Sorry. Lapsus.
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.