Skip to content
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

Declaration of Carbon\Carbon::setTime($hour, $minute, $second = 0) should be compatible with DateTime::setTime($hour, $minute, $second = NULL, $microseconds = NULL) #914

Closed
ocean90 opened this issue Mar 24, 2017 · 8 comments

Comments

@ocean90
Copy link
Contributor

ocean90 commented Mar 24, 2017

PHP 7.1 changes how Datetime handles microseconds, see http://php.net/manual/de/migration71.incompatible.php#migration71.incompatible.datetime-microseconds.

Looks like this also affects DateTime::setTime()which now has a $microseconds parameter.

@mikeyzm
Copy link

mikeyzm commented May 13, 2017

Update Carbon library to latest version may solve this problem.

@Danny-Guzman
Copy link

Carbon::setTime($hour, $minute, $second = NULL) not compatible with
PHP 7.1.0 DateTime::setTime($hour, $minute, $second = null, $microseconds = NULL )

http://php.net/manual/en/datetime.settime.php
7.1.0 The microseconds parameter was added.

On line 681 of the includes/lib/Carbon.php the function setTime is missing the $microseconds = null parameter

@ahmed-sigmalux
Copy link

Any luck getting your PR committed?

@Danny-Guzman
Copy link

Danny-Guzman commented Nov 8, 2017 via email

@cfoellmann
Copy link
Contributor

@Danny-Guzman I think the test WP_Stream\Test_Admin::test_ajax_filters is broken by something in the current codebase. Nothing to do with any PR now pending.
maybe someone from the @xwp devs can have a look. ping @lukecarbis

@proweb
Copy link

proweb commented Jan 9, 2018

+1
PHP 7.1

image

@robertandrews
Copy link

I just switched from PHP 5.6 to 7.2 and found this warning...

Warning: Declaration of Carbon\Carbon::setTime($hour, $minute, $second = 0) should be compatible with DateTime::setTime($hour, $minute, $second = NULL, $microseconds = NULL) in /home/mysite/public_html/wp-content/plugins/stream/includes/lib/Carbon.php on line 2213

The same issue also affects the Date Range Filter plugin you worked on.

Any chance of a resolution?

@DavidCramer
Copy link
Contributor

Addressed via 4017b31 and #966

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

No branches or pull requests

8 participants