We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2146e4e commit b9046caCopy full SHA for b9046ca
.git-blame-ignore-revs
@@ -5,3 +5,4 @@ c0c6bf6fb1c3ad80ff54b7420853ecc9096ee576
5
d637c653da4a72e3b2b1132c1f0a4af3e0135387
6
de3cddf99b38b4504132eb7449c2b7a20aee5cc3
7
ad93f3bac4b6e6937e0e9a1a709afe31e66c5f54
8
+6c08e6e8b8f13e2ef4526bb18edbac2b136d3261
src/ObjectHelpers/str_helpers.php
@@ -47,8 +47,12 @@ function stringify(mixed $str): string
47
}
48
49
if (!function_exists('str_limit')) {
50
- function str_limit(string $str, int $limit = 100): string
+ function str_limit(?string $str = null, int $limit = 100): ?string
51
{
52
+ if ($str == null) {
53
+ return null;
54
+ }
55
+
56
return Str::limit($str, $limit);
57
58
0 commit comments