Skip to content

Commit e157da1

Browse files
committed
Update initialisation check for new PHP-8.3 API
1 parent f8b42da commit e157da1

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

ext/date/php_date.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4957,9 +4957,9 @@ PHP_METHOD(DatePeriod, __construct)
49574957
}
49584958
} else {
49594959
/* check initialisation */
4960-
DATE_CHECK_INITIALIZED(Z_PHPDATE_P(start)->time, DateTimeInterface);
4960+
DATE_CHECK_INITIALIZED(Z_PHPDATE_P(start)->time, date_ce_interface);
49614961
if (end) {
4962-
DATE_CHECK_INITIALIZED(Z_PHPDATE_P(end)->time, DateTimeInterface);
4962+
DATE_CHECK_INITIALIZED(Z_PHPDATE_P(end)->time, date_ce_interface);
49634963
}
49644964

49654965
/* init */

ext/date/tests/bug-gh11416.phpt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ try {
2323
echo "OK\n";
2424
?>
2525
--EXPECT--
26-
Error: The DateTimeInterface object has not been correctly initialized by its constructor
27-
Error: The DateTimeInterface object has not been correctly initialized by its constructor
26+
DateObjectError: Object of type DateTimeInterface has not been correctly initialized by calling parent::__construct() in its constructor
27+
DateObjectError: Object of type DateTimeInterface has not been correctly initialized by calling parent::__construct() in its constructor
2828
OK

0 commit comments

Comments
 (0)