Skip to content

php8.1+ 报 Deprecated #437

@nfhh

Description

@nfhh

Deprecated: Qiniu\Config::__construct(): Implicitly marking parameter $z as nullable is deprecated, the explicit nullable type must be used instead in C:\Users\Administrator\Herd\newgtb\vendor\qiniu\php-sdk\src\Qiniu\Config.php on line 44

弃用警告:Qiniu\Config 类的构造函数中,参数 $z 被隐式标记为可空类型(nullable),这是被弃用的做法。你需要明确地使用 ? 来声明其为可空类型。
public function __construct(Region $z = null) {

要改为

public function __construct(?Zone $z = null) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions