[php-src] PR #22843: ext/standard: Fix `setlocale()` NUL byte truncation

From: Date: Tue, 21 Jul 2026 09:43:43 +0000
Subject: [php-src] PR #22843: ext/standard: Fix `setlocale()` NUL byte truncation
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-37217@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/22843 Author: LamentXU123 ```php <?php var_dump(setlocale(LC_ALL, "C\0invalid")); ``` ``` string(1) "C" ``` See: https://3v4l.org/rHId2#v New argument logic in try_setlocale_zval is inevitable because we need to know the argument position when we raise the ValueError (both the second and the third parameter of the setlocale function have the truncation issue)

« previous php.git-pulls (#37217) next »