我在本地主机上使用composer安装了zend框架。我使用xampp内置的php服务器来部署我的zendframework应用程序。安装后有一个错误日志"compact():Undefined variable: extras in C:\Users\oyela\Documents\zend\path\to\install\vendor\zendframework\zend-view\src\Helper\HeadLink.php on line 404“
我尝试在HeadLink.php文件中使用不同的名称空间:
$attributes = compact('rel', 'type', 'href', 'media', 'conditionalStylesheet', 'extras');我希望显示zend索引页,但显示的是这个错误日志。
发布于 2019-02-01 15:22:22
在PHP7.3下,我们在第413行的src\Helper\HeadLink.php中看到以下日志记录: PHP Notice: compact():Undefined variable: extras
快速修复将408-413行替换为:
$attributes = compact('rel', 'type', 'href', 'media', 'conditionalStylesheet');
if ($args && is_array($args[0])) {
$attributes['extras'] = array_shift($args);
}你可以在PHP 7.3 issue with compact() in HeadLink.php #172上找到更多关于这方面的细节
https://stackoverflow.com/questions/54298826
复制相似问题