Support

Account

Home Forums Bug Reports PHP strict error on ACF 4.1.8+

Solved

PHP strict error on ACF 4.1.8+

  • Following the change made on ACF 4.1.8 I am getting this error, running on php 5.4 in strict mode.

    Strict Standards: Only variables should be passed by reference in …wp-content/plugins/advanced-custom-fields/core/fields/_functions.php on line 55

    To solve it should be only creating a var before to hold the “$found = false” and send it to the wp_cache_get.

    The same aplies to 2 other files, as far as I know:
    core/controllers/field_group.php
    core/api.php

    Thanks for looking into it!

    • Elliot

    • July 12, 2013 at 5:29 pm

    Hi @andrefelipe

    Thanks for the bug report.

    So just to clarify, passing $found = false within the parameter space is causing an ERROR in PHP?

    And the fix is to create $found before the wp_cache_get function?

    • Elliot

    • July 12, 2013 at 5:31 pm

    These changes have been made and pushed to the latest files on github!

  • wonderful, that was exactly it! That way the var is correctly referenced.

    Thanks a bunch!

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

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.