Skip to content

Commit 798d05d

Browse files
committed
Fix explode(): Passing null to parameter #2 ($string) of type string is deprecated
1 parent b385103 commit 798d05d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Feeds/Target/FractionTarget.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ protected function prepareValue($delta, array &$values) {
7171
switch ($this->configuration['type']) {
7272
case 'fraction':
7373
// Pull out the numerator and denominator.
74-
$parts = explode('/', $item);
74+
$parts = is_string($item) ? explode('/', $item) : [];
7575

7676
if (!empty($parts[0]) && is_numeric($parts[0]) && !empty($parts[1]) && is_numeric($parts[1]) && $parts[1] >= 0) {
7777
$values['numerator'] = $parts[0];

0 commit comments

Comments
 (0)