commit 929b83d97b6f2747e58a6a58a2a5d76b92a8a248 Author: fago Date: Thu Feb 28 10:49:19 2013 +0100 Use drupal_strlen diff --git a/core/lib/Drupal/Core/TypedData/ItemList.php b/core/lib/Drupal/Core/TypedData/ItemList.php index 4230ddc..3c6d01a 100644 --- a/core/lib/Drupal/Core/TypedData/ItemList.php +++ b/core/lib/Drupal/Core/TypedData/ItemList.php @@ -79,7 +79,8 @@ public function getString() { foreach ($this->list as $item) { $strings[] = $item->getString(); } - return implode(', ', array_filter($strings, 'strlen')); + // Remove any empty strings resulting from empty items. + return implode(', ', array_filter($strings, 'drupal_strlen')); } } diff --git a/core/lib/Drupal/Core/TypedData/Type/Map.php b/core/lib/Drupal/Core/TypedData/Type/Map.php index d7df77a..01598d0 100644 --- a/core/lib/Drupal/Core/TypedData/Type/Map.php +++ b/core/lib/Drupal/Core/TypedData/Type/Map.php @@ -78,7 +78,8 @@ public function getString() { foreach ($this->getProperties() as $property) { $strings[] = $property->getString(); } - return implode(', ', array_filter($strings, 'strlen')); + // Remove any empty strings resulting from empty items. + return implode(', ', array_filter($strings, 'drupal_strlen')); } /**