Skip to content

Commit

Permalink
magento#481 Do not begins with dot when there is no suffix
Browse files Browse the repository at this point in the history
  • Loading branch information
Raul E Watson committed Mar 17, 2018
1 parent ff55e4c commit eb41216
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Migration/Step/UrlRewrite/Model/Suffix.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public function getSuffix($suffixFor, $mainTable = 's')
if ($row['store_path'] !== null) {
$suffix = $row['store_value'];
}
$suffix = $this->ensureSuffixBeginsWithDot($suffix);
$suffix = $suffix ? $this->ensureSuffixBeginsWithDot($suffix) : $suffix;
$this->suffixData[$suffixFor][] = [
'store_id' => $row['store_id'],
'suffix' => $suffix
Expand All @@ -105,6 +105,6 @@ public function getSuffix($suffixFor, $mainTable = 's')
*/
private function ensureSuffixBeginsWithDot($suffix)
{
return substr($suffix, 0, 1) === "." ? $suffix : '.' . $suffix;
return $suffix[0] === '.' ? $suffix : '.' . $suffix;
}
}

0 comments on commit eb41216

Please sign in to comment.