Skip to content

Commit

Permalink
E_DEPRECATED
Browse files Browse the repository at this point in the history
  • Loading branch information
Sekiphp committed Apr 13, 2023
1 parent 6c7f387 commit 825a36d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Migration/Handler/TruncateSuffix.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,13 @@ public function handle(Record $recordToHandle, Record $oppositeRecord)
if (in_array($recordToHandle->getValue('attribute_id'), $attributeIds)) {
$suffix = '~' . preg_quote($this->getSuffix()) . '$~';
$value = $recordToHandle->getValue($this->field);
$value = preg_replace($suffix, '', $value);

// custom edit start
if ($value !== null) {
$value = preg_replace($suffix, '', $value);
}
// custom edit end

$recordToHandle->setValue($this->field, $value);
}
}
Expand Down

0 comments on commit 825a36d

Please sign in to comment.