- Issue created by @Juanjol
- Status changed to Needs review
9 months ago 2:41pm 20 February 2024 - Merge request !13Issue #3422669: If new value is of array type, check if old too before compare → (Open) created by Juanjol
Sometimes old and new values do not necessarily have to be of the same type. When iterating to find the changes, you may want to keep iterating because the new values are an array, but the old value was a string. This happens especially in interactions between metatag modules, schema.org, and image type fields.
The error displayed is this:
TypeError: Drupal\log_entity_operations\ArrayDiff::diff(): Argument #1 ($old) must be of type array, string given, called in web/modules/contrib/log_entity_operations/src/ArrayDiff.php on line 88 in Drupal\log_entity_operations\ArrayDiff->diff() (line 28 of web/modules/contrib/log_entity_operations/src/ArrayDiff.php).
Check if the old value to be compared is an array too.
Needs review
1.0
Code