【问题标题】:Fatal error: Uncaught Error: [] operator not supported for strings - Codazon Themeframework -- Categoriestree.php致命错误:未捕获错误:字符串不支持 [] 运算符 - Codazon Themeframework - Categoriestree.php
【发布时间】:2019-08-23 02:10:22
【问题描述】:

在服务器之间迁移 Magento 1.9.3.7 站点后,我无法访问设置页面:导航到管理>系统>配置 显示如下错误:

致命错误:未捕获错误:/home/defaultwebsite/public/app/code/local/Codazon/Themeframework/Model/System/Config/Source/Categoriestree.php:28 中的字符串不支持 [] 运算符

Categoriestree.php:28 错误在这里 >>

$this->_categoriesTree[] = array('value' => $item['category_id'],'label' => str_repeat("–––", $level)." ".$item['name']);

【问题讨论】:

  • 文件 we.tl/t-ZRCirZ7wik
  • 请将相关代码嵌入到您的帖子中。该链接可能会变为绝对链接,然后其他人将无法使用您的问题 + 答案。
  • 服务器日志:AH01797:客户端被服务器配置拒绝:/home/defaultwebsite/public/app/etc/local.xml

标签: php magento-1.9


【解决方案1】:

可能这个帖子有帮助,类似于你的问题错误 https://www.key2goal.com/article/wordpress-error-php-71-php-fatal-error-uncaught-error-operator-not-supported-strings

如果你使用 php 7.1,那么你需要正确的数组定义..

可以这样定义

$this->_categoriesTree = array();

【讨论】:

    猜你喜欢
    • 2019-02-25
    • 2011-08-18
    • 2021-05-24
    • 1970-01-01
    • 2010-09-17
    • 2021-05-20
    • 2018-06-20
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多