php - Wordpress 中的错误 - 升级 PHP 7.4 后的 elementor
问题描述
升级到 PHP 7.4 后,elemntor 开始报错
网址:www.aldon.ltd/ 云服务:GCP 服务器:Openlitespeed Wordpress Linux:Ubuntu 20.04 LTS
Notice: Trying to access array offset on value of type null in /var/www/html/wp-content/plugins/elementor/includes/base/controls-stack.php on line 1449
注意:尝试访问第 1451 行 /var/www/html/wp-content/plugins/elementor/includes/base/controls-stack.php 中 null 类型值的数组偏移量
除了网页顶部显示的此通知外,所有其他功能均按预期工作。
导致错误的代码 /** * 结束控制部分。* * 用于关闭现有打开的控件部分。当您使用此方法时 * 它会停止向此部分添加新控件。** 这个方法应该用在_register_controls()
. * * @since 1.4.0 * @access public */ 公共函数 end_controls_section() { $stack_name = $this->get_name();
// Save the current section for the action.
$current_section = $this->current_section;
$section_id = $current_section['section'];
$args = [
'tab' => $current_section['tab'],
];
/usr/local/lsws/logs/error.log 中的错误日志
PHP 注意: wp_deregister_script 被错误地调用。不要jquery-core
在管理区域中取消注册脚本。要针对前端主题,请使用 wp_enqueue_scrip> PHP 注意:/var/www/html/wp-content/plugins/elementor/includes/base/controls-stack.php on line 1449 PHP 注意:/var/www/第 1451 行的 html/wp-content/plugins/elementor/includes/base/controls-stack.php
解决方案
我解决了它作为临时解决方案。更改线路编号 1204 起
if ( $dynamic_property ) ) {
至
if ( $dynamic_property && isset($settings[ $control_name ][ $dynamic_property ]) ) {
推荐阅读
- c# - 接口继承设计问题
- database - 3-Way Relation or Relation with Relation in Laravel?
- javascript - 内容编辑器 Web 部件 (CEWP) 中的 JavaScript
- python - 合并的字典列表
- javascript - Discord.js 如何使用用户 ID ping 用户
- django - 如何在所有其他 wagtail 页面上导入 Wagtail 页面
- javascript - 在 ThreeJS 中将物理添加到 OBJ 模型
- python - 如何在 Python 中编写具有重复键的 json 文件?
- php - 在带有输入数组的while循环中使用一个提交按钮提交表单
- python - 成功训练后 keras predict_generator 抛出错误