Skip to content

Fixed oop return type of DateTimeInterface::getOffset. #282

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed

Conversation

mumumu
Copy link
Member

@mumumu mumumu commented Dec 22, 2020

It does not return false, but zero.

https://github.com/php/php-src/blob/caa710037e663fd78f67533b29611183090068b2/ext/date/php_date.c#L3099-L3130

Note: if this fix is correct, we need to fix ext/date/php_date.stub.php.

Copy link
Member

@cmb69 cmb69 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, good catch! Actually, these methods could have returned false prior to PHP 8.0.0, due to failing DATE_CHECK_INITIALIZED. So yes, php_date.stub.php should be fixed analogously.

@mumumu
Copy link
Member Author

mumumu commented Dec 26, 2020

closes by commit: 260c0b8

@mumumu mumumu closed this Dec 26, 2020
@mumumu mumumu deleted the fix-return-type-datetimeinterface-getoffset branch December 26, 2020 10:28
cmb69 added a commit to cmb69/php-src that referenced this pull request Dec 26, 2020
php-pulls pushed a commit to php/php-src that referenced this pull request Dec 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants