I ran into a similar problem which I worked around with extract(). But with extract() there are some security considerations, so please read up on the link below before implementing.
http://php.net/manual/en/function.extract.php
EDIT:
Another good resource on extract()
http://stackoverflow.com/questions/829407/what-is-so-wrong-with-extract
Hope this helps 🙂
Yup looks good, thank you 🙂
Offending Post would be the post which has the repeater with no values (empty). In the case you have described above, it would be the 4/5 posts.
As you said you have tried updating the CPTs and the issue persists, so I guess the temporary fix does not work for you. It seems to have worked for other people, perhaps you have implemented the code differently.
Also check the reply on the other thread linked above.
@t-racer It was more like an attempt at a temporary hackey fix till the actual problem gets sorted out.
Note for anyone trying to use the empty update post temp hackey fix.
Updating the empty post causes the have_rows( ‘acf_field_name’ ) to return true, Consequently an empty row gets printed out 😐
Also, apparently it does not work for everyone.
Same here.
In addition, if you just do an empty update on the offending post, the error goes away.
In addition to what you just described. If you just do an empty update of the offending post. The error goes away.
Others are discussing it here:
http://support.advancedcustomfields.com/forums/topic/api-helpers-php-on-line-846-error-after-updating/
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.