Loading src/Feeds/Target/Boolean.php +1 −1 Changes for src/Feeds/Target/Boolean.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ class Boolean extends FieldTargetBase { * {@inheritdoc} */ protected function prepareValue($delta, array &$values) { $values['value'] = (int) (bool) trim($values['value']); $values['value'] = is_string($values['value']) ? (int) (bool) trim($values['value']) : (int) FALSE; } } src/Feeds/Target/ConfigEntityReference.php +1 −1 Changes for src/Feeds/Target/ConfigEntityReference.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -286,7 +286,7 @@ class ConfigEntityReference extends FieldTargetBase implements ConfigurableTarge // Hack to find out the target delta. foreach ($form_state->getValues() as $key => $value) { if (strpos($key, 'target-settings-') === 0) { list(, , $delta) = explode('-', $key); [, , $delta] = explode('-', $key); break; } } Loading src/Feeds/Target/DateTargetBase.php +1 −1 Changes for src/Feeds/Target/DateTargetBase.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ abstract class DateTargetBase extends FieldTargetBase implements ConfigurableTar * has errors. */ protected function convertToDate($value) { $value = trim($value); $value = trim((string) $value); // This is a year value. if (ctype_digit($value) && strlen($value) === 4) { Loading src/Feeds/Target/Email.php +1 −1 Changes for src/Feeds/Target/Email.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ class Email extends FieldTargetBase implements ConfigurableTargetInterface { * {@inheritdoc} */ protected function prepareValue($delta, array &$values) { $values['value'] = trim($values['value']); $values['value'] = is_string($values['value']) ? trim($values['value']) : $values['value']; if (!filter_var($values['value'], FILTER_VALIDATE_EMAIL)) { $values['value'] = ''; } Loading src/Feeds/Target/EntityReference.php +2 −2 Changes for src/Feeds/Target/EntityReference.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -337,7 +337,7 @@ class EntityReference extends FieldTargetBase implements ConfigurableTargetInter * The ID of the new entity or false if the given label is empty. */ protected function createEntity($label) { if (!strlen(trim($label))) { if (!is_string($label) || !strlen(trim($label))) { return FALSE; } Loading Loading @@ -394,7 +394,7 @@ class EntityReference extends FieldTargetBase implements ConfigurableTargetInter $delta = 0; foreach ($form_state->getValues() as $key => $value) { if (strpos($key, 'target-settings-') === 0) { list(, , $delta) = explode('-', $key); [, , $delta] = explode('-', $key); break; } } Loading Loading
src/Feeds/Target/Boolean.php +1 −1 Changes for src/Feeds/Target/Boolean.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -21,7 +21,7 @@ class Boolean extends FieldTargetBase { * {@inheritdoc} */ protected function prepareValue($delta, array &$values) { $values['value'] = (int) (bool) trim($values['value']); $values['value'] = is_string($values['value']) ? (int) (bool) trim($values['value']) : (int) FALSE; } }
src/Feeds/Target/ConfigEntityReference.php +1 −1 Changes for src/Feeds/Target/ConfigEntityReference.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -286,7 +286,7 @@ class ConfigEntityReference extends FieldTargetBase implements ConfigurableTarge // Hack to find out the target delta. foreach ($form_state->getValues() as $key => $value) { if (strpos($key, 'target-settings-') === 0) { list(, , $delta) = explode('-', $key); [, , $delta] = explode('-', $key); break; } } Loading
src/Feeds/Target/DateTargetBase.php +1 −1 Changes for src/Feeds/Target/DateTargetBase.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -23,7 +23,7 @@ abstract class DateTargetBase extends FieldTargetBase implements ConfigurableTar * has errors. */ protected function convertToDate($value) { $value = trim($value); $value = trim((string) $value); // This is a year value. if (ctype_digit($value) && strlen($value) === 4) { Loading
src/Feeds/Target/Email.php +1 −1 Changes for src/Feeds/Target/Email.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -31,7 +31,7 @@ class Email extends FieldTargetBase implements ConfigurableTargetInterface { * {@inheritdoc} */ protected function prepareValue($delta, array &$values) { $values['value'] = trim($values['value']); $values['value'] = is_string($values['value']) ? trim($values['value']) : $values['value']; if (!filter_var($values['value'], FILTER_VALIDATE_EMAIL)) { $values['value'] = ''; } Loading
src/Feeds/Target/EntityReference.php +2 −2 Changes for src/Feeds/Target/EntityReference.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -337,7 +337,7 @@ class EntityReference extends FieldTargetBase implements ConfigurableTargetInter * The ID of the new entity or false if the given label is empty. */ protected function createEntity($label) { if (!strlen(trim($label))) { if (!is_string($label) || !strlen(trim($label))) { return FALSE; } Loading Loading @@ -394,7 +394,7 @@ class EntityReference extends FieldTargetBase implements ConfigurableTargetInter $delta = 0; foreach ($form_state->getValues() as $key => $value) { if (strpos($key, 'target-settings-') === 0) { list(, , $delta) = explode('-', $key); [, , $delta] = explode('-', $key); break; } } Loading