Here, in Italy, we are usually to say: “Di sicuro, c’รจ solo la morte”.
@hube2 I think you’re totally right:
7.1.0 The allowed_classes element of options) is now strictly typed, i.e. if anything other than an array or a boolean is given, unserialize() returns FALSE and issues an E_WARNING.
Thank you @hube2, as I wrote in my previous posts, get_field()
returns FALSE
, just in our production environment with PHP 7.1.x
Anyone could suggest an easy way to try debug the issue?
@hube2 is it not getting the values. get_field()
returns FALSE instead of an array.
Once again, I solved the issue using the native function get_post_meta()
, but it is a little bit strange behaviour.
Hi @hube2,
thank you for your reply. I know my english is orrible, I am sorry. Try to better explain myself.
In our local environment (same db as production, same code (GIT), same plugin, etc…):
$values = get_field($field_name, $post_id, false);
it works. It returns an array. On our production it returns false
WTF.
PHP version is just the one difference beetwen environment.
For your information:
$post_id is the current language POST ID, so it is right. We are getting values from the current POST ID and copy it to the translated posts, because we want the same exactly gallery, even if user upload photos to german version (for example) and not into english version.
Best regards
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.