From 5fbba9b995167673bc2b553e39e547d24a90b456 Mon Sep 17 00:00:00 2001 From: Kamil Tekiela Date: Wed, 29 Sep 2021 21:09:05 +0100 Subject: [PATCH] getTimestamp does not return false --- ext/date/php_date.stub.php | 2 +- ext/date/php_date_arginfo.h | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/ext/date/php_date.stub.php b/ext/date/php_date.stub.php index a311f0fa0fb..5720ac3f573 100644 --- a/ext/date/php_date.stub.php +++ b/ext/date/php_date.stub.php @@ -198,7 +198,7 @@ interface DateTimeInterface public function getOffset(): int; /** @tentative-return-type */ - public function getTimestamp(): int|false; + public function getTimestamp(): int; /** @tentative-return-type */ public function diff(DateTimeInterface $targetObject, bool $absolute = false): DateInterval; diff --git a/ext/date/php_date_arginfo.h b/ext/date/php_date_arginfo.h index 982534817b8..3b8f1578f94 100644 --- a/ext/date/php_date_arginfo.h +++ b/ext/date/php_date_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: e4585948a8767182f38b553b603e06555e92c372 */ + * Stub hash: ea354510fbf64c42ee1cdd6fd786ab937516226c */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_strtotime, 0, 1, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(0, datetime, IS_STRING, 0) @@ -235,8 +235,7 @@ ZEND_END_ARG_INFO() ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_INFO_EX(arginfo_class_DateTimeInterface_getOffset, 0, 0, IS_LONG, 0) ZEND_END_ARG_INFO() -ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_TYPE_MASK_EX(arginfo_class_DateTimeInterface_getTimestamp, 0, 0, MAY_BE_LONG|MAY_BE_FALSE) -ZEND_END_ARG_INFO() +#define arginfo_class_DateTimeInterface_getTimestamp arginfo_class_DateTimeInterface_getOffset ZEND_BEGIN_ARG_WITH_TENTATIVE_RETURN_OBJ_INFO_EX(arginfo_class_DateTimeInterface_diff, 0, 1, DateInterval, 0) ZEND_ARG_OBJ_INFO(0, targetObject, DateTimeInterface, 0)