Problem/Motivation
On importing from an iCal feed, I got two errors:
Drupal\tamper\Exception\TamperException: Input should be a string. in Drupal\tamper\Plugin\Tamper\HtmlEntityDecode->tamper() (line 26 of /home/winche20/towncommon.org/modules/tamper/src/Plugin/Tamper/HtmlEntityDecode.php).
Drupal\tamper\Exception\TamperException: Input should be a string. in Drupal\tamper\Plugin\Tamper\Explode->tamper() (line 72 of /home/winche20/towncommon.org/modules/tamper/src/Plugin/Tamper/Explode.php).
I think these result from empty feed inputs, or possibly from a mapping from a blank source.
StripTags.php has a provision for this (line 56-58):
if (is_null($data) || $data === '') {
return $data;
}
Proposed resolution
I suggest adding the test
if (empty($data)) return('');
before line 26 of HtmlEntityDecode.php and before line 72 of Explode.php.
Would that be a problem, or do null data values indicate that something is wrong with the feed?