Skip to content

php8.1删除文件会报错 #390

Closed
Closed
@cgfeel

Description

@cgfeel
PHP Deprecated:  strlen(): Passing null to parameter #1 ($string) of type string is deprecated in /app/api_service/vendor/qiniu/php-sdk/src/Qiniu/Auth.php on line 125

错误原因是调用signQiniuAuthorization的时候,$body传参null,导致strlen($body) > 0时出现问题

麻烦修传$body的时候用$body?:'',或者兼容写法$body ? $body : ''

PHP版本: 8.1.1

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