From f0bb151c85d6500f5bb39df5c03d92c0c68e49e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=2E=20Nagy=20Gerg=C5=91?= Date: Wed, 25 Oct 2023 13:51:21 +0200 Subject: [PATCH] cast --- src/Fields/Slug.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Fields/Slug.php b/src/Fields/Slug.php index de7fcf81..4f6b0385 100644 --- a/src/Fields/Slug.php +++ b/src/Fields/Slug.php @@ -173,7 +173,7 @@ static function (Builder $query): Builder { $value = is_null($match) ? $value : preg_replace_callback( sprintf('/%s([\d]+)?$/', preg_quote($this->separator)), static function (array $match): string { - return str_replace($match[1], ((int) $match[1]) + 1, $match[0]); + return str_replace($match[1], (string) (((int) $match[1]) + 1), $match[0]); }, $match );