ranlychan / NewSmmsForTypecho

一个支持smms新旧域名的Typecho图床插件

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

报错,不知道什么原因!

QAQ2077 opened this issue · comments

commented

Fatal error: Declaration of NewSmmsForTypecho_Plugin::deleteHandle(array $content) must be compatible with Widget\Upload::deleteHandle(array $content): bool in /www/wwwroot/lv7.cc/usr/plugins/NewSmmsForTypecho/Plugin.php on line 15
具体就这样,我也不知道!php7.3 难道是这个原因?

初步排查可能是deleteHandle函数的返回类型与父类不相符导致的。在Typecho 1.2中返回类型应该为boolean而不是string,所以和父类的定义产生冲突而不相容。

    /**
     * 删除文件
     *
     * @access public
     * @param array $content 文件相关信息
     * @return string
     */
    public static function deleteHandle(array $content)

这个问题是由于,插件暂时还不支持Typecho 1.2,在Typecho 1.1中的deleteHandle方法返回值为string,因此插件是可以正常运行的,而在1.2中deleteHandle返回值为boolean。

计划在后两个月适配到Typecho 1.2。

commented

好吧

commented

2023年了,我都没想到还有人用1.1的