Skip to content

fix: PHP 8.1+ null parameter deprecation in Generator.php#473

Closed
sysmonf wants to merge 1 commit intoezyang:masterfrom
sysmonf:patch-1
Closed

fix: PHP 8.1+ null parameter deprecation in Generator.php#473
sysmonf wants to merge 1 commit intoezyang:masterfrom
sysmonf:patch-1

Conversation

@sysmonf
Copy link

@sysmonf sysmonf commented Jan 19, 2026

PHP 8.1+ deprecated passing null to internal string functions. This causes deprecation warnings when attribute values are null in generateAttributes() and escape() methods.

Adds null coalescing operator (?? '') to:

  • strpos() - line 251
  • strcspn() - line 254
  • strlen() - line 254
  • htmlspecialchars() - line 282

PHP 8.1+ deprecated passing null to internal string functions. This causes deprecation warnings when attribute values are null in `generateAttributes()` and `escape()` methods.

Adds null coalescing operator (`?? ''`) to:
- `strpos()` - line 251
- `strcspn()` - line 254
- `strlen()` - line 254
- `htmlspecialchars()` - line 282
@sysmonf
Copy link
Author

sysmonf commented Feb 8, 2026

closing, as I have more extensive patch

@sysmonf sysmonf closed this Feb 8, 2026
@sysmonf sysmonf deleted the patch-1 branch February 8, 2026 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant