diff options
| author | Greg Roach <greg@subaqua.co.uk> | 2021-10-13 14:04:58 +0100 |
|---|---|---|
| committer | Greg Roach <greg@subaqua.co.uk> | 2021-10-13 14:09:26 +0100 |
| commit | 4502a88863de403bfa29a497c3559bc8c079302c (patch) | |
| tree | 65e80b1c50840447bd6d59aeae7b5fa1f7e601fb /app/Factories/SlugFactory.php | |
| parent | 73d58381388d199b1beb6f2a613b98f25617f706 (diff) | |
| download | webtrees-4502a88863de403bfa29a497c3559bc8c079302c.tar.gz webtrees-4502a88863de403bfa29a497c3559bc8c079302c.tar.bz2 webtrees-4502a88863de403bfa29a497c3559bc8c079302c.zip | |
Strict type checking
Diffstat (limited to 'app/Factories/SlugFactory.php')
| -rw-r--r-- | app/Factories/SlugFactory.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/Factories/SlugFactory.php b/app/Factories/SlugFactory.php index 73c1bc879d..6a32d77d98 100644 --- a/app/Factories/SlugFactory.php +++ b/app/Factories/SlugFactory.php @@ -57,6 +57,10 @@ class SlugFactory implements SlugFactoryInterface if ($this->transliterator instanceof Transliterator) { $slug = $this->transliterator->transliterate($slug); + + if ($slug === false) { + return null; + } } $slug = preg_replace('/[^A-Za-z0-9]+/', '-', $slug); |
