EntityMetadataWrapperException: Invalid data value given. Be sure it matches the required data type and format. Value at field_collection_item()->field_farm_quantity_value->denominator: 1.000000000000000000000000. in EntityMetadataWrapper->set() #367
Labels
The change in 7aa49b6 has started causing issues elsewhere. Notably, many quick forms will create quantity measurement logs, which call
fraction_from_decimal()
, which uses BCMath to create a numerator and denominator. These quick forms (like the Eggs form) were resulting in the following error:EntityMetadataWrapperException: Invalid data value given. Be sure it matches the required data type and format. Value at field_collection_item()->field_farm_quantity_value->denominator: 1.000000000000000000000000. in EntityMetadataWrapper->set() (line 122 of /var/www/html/profiles/farm/modules/contrib/entity/includes/entity.wrapper.inc).
@paul121 and I did a ton of testing and discovered an interesting bug with PHP that causes the bcscale to persist across page loads within an Apache process: https://bugs.php.net/bug.php?id=78330
This bug is fixed in PHP 8: php/php-src@ac87880
However, the change in 7aa49b6 is what actually caused the issue to become apparent.
The text was updated successfully, but these errors were encountered: