Contents

Typecho报错Trying to access array offset XXX

Contents

Typecho-php 报错修复!!!

Typecho在使用php7.4.X时,后台登陆页面会出现以下报错信息:

Notice: Trying to access array offset on value of type null in /var/www/html/typecho/admin/common.php on line 36

修复方法:

vim /var/www/html/typecho/admin/common.php

1
2
将第36行'$params = parse_url($currentMenu[2]);'改为以下内容保存即可:
$params = parse_url(isset($currentMenu[2]) ? $currentMenu[2] : null);