gpt4 book ai didi

php - WordPress 错误 "A variable mismatch has been detected."

转载 作者:行者123 更新时间:2023-12-02 19:55:17 25 4
gpt4 key购买 nike

我在尝试删除重力形式优惠券提要时收到此 WordPress 错误:

A variable mismatch has been detected.

注意:我正在动态创建提要 (PHP)。

我尝试使用所有调试插件对其进行调试并启用所有调试标志,但我不明白这是为什么以及是什么原因造成的?

有人可以解释原因以及为什么会触发此错误吗?

最佳答案

呼...

WordPress 在

上显示此错误
elseif ( isset( $_GET[ $wpvar ] ) && isset( $_POST[ $wpvar ] ) && $_GET[ $wpvar ] !== $_POST[ $wpvar ] ) {
wp_die( __( 'A variable mismatch has been detected.' ), __( 'Sorry, you are not allowed to view this item.' ), 400 );
}

https://github.com/WordPress/WordPress/blob/abcbee954f4d8baa5aff2df566a942c1b48ca2d7/wp-includes/class-wp.php

这意味着如果两个数组 ($_POST/$_GET) 中都存在任何元素,则该值应该相同。

在我的例子中,$_GET['page'] 不等于 $_POST['page'] 触发了这个错误。

关于php - WordPress 错误 "A variable mismatch has been detected.",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57209069/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com