[php-src] PR #25642: ext/intl: Preserve the previous MessageFormatter pattern on failure

From: Date: Sat, 21 Nov 2026 10:17:29 +0000
Subject: [php-src] PR #25642: ext/intl: Preserve the previous MessageFormatter pattern on failure
Groups: php.git-pulls 
Request: Send a blank email to git-pulls+get-40875@lists.php.net to get a copy of this message
Pull Request: https://github.com/php/php-src/pull/25642 Author: LamentXU123 When MessageFormatter::setPattern() rejects an invalid pattern getPattern() still returns the previous pattern but ICU may already have discarded it. ```php $fmt = new MessageFormatter('en', 'Hello, {0}!'); $fmt->setPattern('{0,date'); // false echo $fmt->format(['world']); // Before: {} After: Hello, world! ``` This is originally reported by @wwkenwong

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