From 805326fe1860dc6e598ba5e366f171a1a837df13 Mon Sep 17 00:00:00 2001 From: Marc Bennewitz Date: Mon, 18 Mar 2024 17:38:30 +0100 Subject: [PATCH] An uninitialized DateTime is UNEXPECTED (#13492) --- ext/date/php_date.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/date/php_date.c b/ext/date/php_date.c index d070ca8860a..f685c362fc9 100644 --- a/ext/date/php_date.c +++ b/ext/date/php_date.c @@ -326,7 +326,7 @@ static void date_throw_uninitialized_error(zend_class_entry *ce) } #define DATE_CHECK_INITIALIZED(member, ce) \ - if (!(member)) { \ + if (UNEXPECTED(!member)) { \ date_throw_uninitialized_error(ce); \ RETURN_THROWS(); \ }