Support

Account

Home Forums Backend Issues (wp-admin) get_field() – strange behaviour Reply To: get_field() – strange behaviour

  • Like I said, if there is not value in the database then the value returned should be NULL. Since it’s returning false, then there is a value in the database.

    The value is stored as a serialized array. The only reason that a field stored as a serialized array would return false is that the string is not unserializeable, see this http://php.net/manual/en/function.unserialize.php.

    What this means is one of 2 things

    1. The data inserted into the database when you move from dev to production is being altered
    2. There is a difference in the way the two versions of php serialize and unserialize