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

php 8.1.8 环境下 SignatureTrait.php on line 28 Passing null to parameter #1 ($datetime) of type string is deprecated #43

Open
zotopteam opened this issue Sep 30, 2022 · 0 comments

Comments

@zotopteam
Copy link

zotopteam commented Sep 30, 2022

在php8.1下会产生警告

local.WARNING: DateTime::__construct(): Passing null to parameter #1 ($datetime) of type string is deprecated in /var/www/picoding_dev/vendor/iidestiny/flysystem-oss/src/Traits/SignatureTrait.php on line 28

下面这段代码:

    public function gmt_iso8601($time)
    {
        // fix bug https://connect.console.aliyun.com/connect/detail/162632
        return (new \DateTime(null, new \DateTimeZone('UTC')))->setTimestamp($time)->format('Y-m-d\TH:i:s\Z');
    }
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

1 participant