[php-src] Issue #12912: IntlDateFormatter fatal error in PHP 8.1.26

From: Date: Sat, 09 Dec 2023 09:21:21 +0000
Subject: [php-src] Issue #12912: IntlDateFormatter fatal error in PHP 8.1.26
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-246020@lists.php.net to get a copy of this message
Issue: https://github.com/php/php-src/issues/12912 Author: randeraad ### Description Related to: https://github.com/php/php-src/issues/12282 In PHP 8.1.24 it was possible to use IntlDateFormatter with an invalid locale: IntlDateFormatter::create('xx'); In PHP 8.1.25 the same code would fail and throw an exception. In PHP 8.1.26 the exception is no longer thrown, but the object is unconstructed and using it generates a fatal error. ```php $obj = IntlDateFormatter::create('xx'); $obj->getCalendar(); // Fatal error: Uncaught Error: Found unconstructed IntlDateFormatter ``` How can we check if the IntlDateFormatter object is constructed without generating a fatal error? ### PHP Version PHP 8.1.26 ### Operating System _No response_

« previous php.bugs (#246020) next »