最近给opencart网站升级补丁,结果升级完,前台显示500错误。

经过一翻排查发现是php错误,具体报错信息为:

PHP Fatal error: Uncaught Error: Class 'Twig\Loader\ArrayLoader' not found in /storage/modification/system/library/template/twig.php:35 
Stack trace:
#0 /public_html/system/library/template.php(51): Template\Twig->render('default/templat...', '{% if modules %...')
#1 /storage/modification/system/engine/loader.php(125): Template->render('default/templat...', '')
#2 /public_html/catalog/controller/common/column_left.php(72): Loader->view('common/column_l...', Array)
#3 /storage/modification/system/engine/action.php(79): ControllerCommonColumnLeft->index(Array)
#4 /storage/modification/system/engine/loader.php(48): Action->execute(Object(Registry), Array)
#5 /public_html/catalog/controller/common/home.php(12): Loader->controller('common/column_l...')
#6 /storage/modification/system/engine/action.php(79): ControllerCommonHome->index()
#7 /public_html/catalog/controller/startup/router.php(25): Action->execut in /storage/modification/system/library/template/twig.php on line 35

百思不得其解,经过排查发现是twig.php的bug导致。只需要下载3.0.3.6新的安装程序,将安装包中的程序/storage/modification/system/library/template/twig.php覆盖掉网站该目录下的文件即可正常访问。

声明:
本站所有文章,如无特殊说明或标注,均为本站原创发布。
任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。
如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。