[prev in list] [next in list] [prev in thread] [next in thread] 

List:       php-cvs
Subject:    [PHP-CVS] [php-src] PHP-8.1: getTimestamp does not return false
From:       Kamil Tekiela <noreply () php ! net>
Date:       2021-09-30 8:15:27
Message-ID: 7nF7lPL38NllioGWLQ5SfL6zBNbpr8d47pBBhxseTNg () main ! php ! net
[Download RAW message or body]

Author: Kamil Tekiela (kamil-tekiela)
Date: 2021-09-30T09:13:55+01:00

Commit: https://github.com/php/php-src/commit/5fbba9b995167673bc2b553e39e547d24a90b456
 Raw diff: https://github.com/php/php-src/commit/5fbba9b995167673bc2b553e39e547d24a90b456.diff


getTimestamp does not return false

Changed paths:
  M  ext/date/php_date.stub.php
  M  ext/date/php_date_arginfo.h


Diff:

diff --git a/ext/date/php_date.stub.php b/ext/date/php_date.stub.php
index a311f0fa0fb6..5720ac3f573c 100644
--- a/ext/date/php_date.stub.php
+++ b/ext/date/php_date.stub.php
@@ -198,7 +198,7 @@ public function getTimezone(): DateTimeZone|false;
     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 982534817b8c..3b8f1578f949 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)

-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic