[php-src] master: An uninitialized DateTime is UNEXPECTED (#13492)
| From: | Marc Bennewitz via GitHub | Date: | Mon, 18 Mar 2024 16:52:19 +0000 |
| Subject: | [php-src] master: An uninitialized DateTime is UNEXPECTED (#13492) | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-127780@lists.php.net to get a copy of this message | ||
Author: Marc Bennewitz (marc-mabe)
Committer: GitHub (web-flow)
Pusher: derickr
Date: 2024-03-18T16:38:30Z
Commit: https://github.com/php/php-src/commit/805326fe1860dc6e598ba5e366f171a1a837df13
Raw diff: https://github.com/php/php-src/commit/805326fe1860dc6e598ba5e366f171a1a837df13.diff
An uninitialized DateTime is UNEXPECTED (#13492)
Changed paths:
M ext/date/php_date.c
Diff:
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index d070ca8860aad..f685c362fc904 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(); \
}