[php-src] PR #21830: Throw a ValueError when the parameter includes NUL bytes in `strptime`
| From: | LamentXU123 | Date: | Wed, 22 Apr 2026 09:36:13 +0000 |
| Subject: | [php-src] PR #21830: Throw a ValueError when the parameter includes NUL bytes in `strptime` | ||
| Groups: | php.git-pulls | ||
| Request: | Send a blank email to git-pulls+get-35833@lists.php.net to get a copy of this message | ||
Pull Request: https://github.com/php/php-src/pull/21830
Author: LamentXU123
```php
<?php
echo strptime("2024-01-11\0UTC", "%Y-%m-%d")['unparsed'];
echo strptime("2024-01-11UTC", "%Y-%m-%d")['unparsed'];
```
resulted in:
```
UTC
```
Actually the ValueError-type changes can be done in bulk in the future. However,
strptime is now deprecated so I don't sure if we should update this function as
well. Feel free to close this if this shouldn't be done on deprecated functions