我正在寻找一个解决这个问题的方法--我使用了PHP7.4,在SMTP.php文件夹中的这个错误--我的代码:
//Is this a PSR-3 logger?
if ($this->Debugoutput instanceof \Psr\Log\LoggerInterface) {
$this->Debugoutput->debug($str);
return;
}发布于 2021-12-21 11:51:29
似乎没有看到您的供应商文件夹,或者您没有通过composer安装psr/log包。
尝试运行命令
composer require psr/log为了获得PSR-3接口
发布于 2021-12-21 12:29:38
首先,这不应该是一个错误。当使用instanceOf时,您要检查的dos类不需要存在,就像它不需要存在于use语句中一样。例如:
$a = 1;
if ($a instanceOf \Cocktails\Gin\Tonic) {
echo 'true';
} else {
echo 'false';
}
exit;这只会显示false,而不会生成错误,即使它要查找的类没有定义--这仅仅意味着instanceOf检查会因为不同的原因而失败。
https://stackoverflow.com/questions/70434493
复制相似问题