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 b392338 commit ecc0933Copy full SHA for ecc0933
README.md
@@ -183,9 +183,9 @@ The following function uses the `htmlspecialchars` function
183
with specific flags to ensure proper encoding:
184
185
```php
186
-function html(string $text = null): string
+function html(?string $text = null): string
187
{
188
- return htmlspecialchars($text, ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');
+ return htmlspecialchars($text ?? '', ENT_QUOTES | ENT_SUBSTITUTE, 'UTF-8');
189
}
190
```
191
0 commit comments