Navigation überspringen

Resolved

Reported for: Advanced Custom Fields Multilingual 2.1.3

Resolved in: Advanced Custom Fields Multilingual 2.1.4

Topic Tags: Bug

Overview of the issue

When using Advanced Custom Fields plugin, you may encounter a fatal PHP error when attempting to save a post that includes a Google Maps field:

PHP Fatal error:  Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array, float given in .../wp-content/plugins/acfml/classes/Helper/HashCalculator.php:67

Workaround

Please, make sure of having a full site backup of your site before proceeding.

  • Open …/wp-content/plugins/acfml/classes/Helper/HashCalculator.php file.
  • Look for line 19.
  • Replace:
    		} elseif ( is_int( $value ) ) {
    
  • With:
    		} elseif ( is_int( $value ) || is_float( $value ) ) {
    

7 Antworten zu “Advanced Custom Fields - PHP Fatal error: Uncaught TypeError: count(): Argument #1 ($value) must be of type Countable|array”

      • When do you plan to release the update? We have this problem on many pages. Unfortunately, the workaround is not feasible.
        Thanks

        • This fix is intended to be released in Advanced Custom Fields Multilingual 2.1.4, however we don’t have an ETA for it.
          We will keep this page updated.

    • Hello there,
      This fix is intended to be released in Advanced Custom Fields Multilingual 2.1.4.
      We will keep this page updated once it is released.