Skip to content

Commit

Permalink
Merge pull request #37 from fwg/master
Browse files Browse the repository at this point in the history
[BUGFIX] fix incoming record being overwritten from DB, stringify pieces
  • Loading branch information
bmack authored Dec 5, 2023
2 parents d895b26 + c12d7ed commit a5a6b85
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Classes/SlugModifier.php
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ protected function resolveHookParameters(array $configuration, string $tableName
$row = $stm->fetchAssociative();
}
if ($row !== false) {
$this->recordData = $row;
$this->recordData = array_replace($row, $record);
}
}

Expand Down Expand Up @@ -137,7 +137,7 @@ protected function regenerateSlug(SlugHelper $helper): string
}
foreach ($fieldNameParts as $fieldName) {
if (!empty($this->recordData[$fieldName])) {
$pieceOfSlug = $this->recordData[$fieldName];
$pieceOfSlug = (string)$this->recordData[$fieldName];
$pieceOfSlug = str_replace(
array_keys($replaceConfiguration),
array_values($replaceConfiguration),
Expand Down

0 comments on commit a5a6b85

Please sign in to comment.