:::
XOOPS使用討論區

Undefined index與protector.php

discuss pic 2018-04-08 12:57:22

我的網站模組已經更新到最新版本

這一兩天修改時看到了很多頁面出現了
Undefined index: _gid in /var/local/lib/xoops/lib/modules/protector/class/protector.php on line 764
我以Undefined index當關鍵字在本站https://www.tad0616.net右下角使用google search看看是否有人貼過這類的文章,但出現以下訊息

我只好進討論區貼文了。想請問這樣的訊息該怎麼調整網站?
我查了764行是 if ($_REQUEST[$key] == $_COOKIE[$key]) {

那一行附近的完整段落如下
public function intval_allrequestsendid()
    {
        global $HTTP_GET_VARS, $HTTP_POST_VARS, $HTTP_COOKIE_VARS;

        if ($this->_done_intval) {
            return true;
        } else {
            $this->_done_intval = true;
        }

        foreach ($_GET as $key => $val) {
            if (substr($key, -2) === 'id' && !is_array($_GET[$key])) {
                $newval     = preg_replace('/[^0-9a-zA-Z_-]/', '', $val);
                $_GET[$key] = $HTTP_GET_VARS[$key] = $newval;
                if ($_REQUEST[$key] == $_GET[$key]) {
                    $_REQUEST[$key] = $newval;
                }
            }
        }
        foreach ($_POST as $key => $val) {
            if (substr($key, -2) === 'id' && !is_array($_POST[$key])) {
                $newval      = preg_replace('/[^0-9a-zA-Z_-]/', '', $val);
                $_POST[$key] = $HTTP_POST_VARS[$key] = $newval;
                if ($_REQUEST[$key] == $_POST[$key]) {
                    $_REQUEST[$key] = $newval;
                }
            }
        }
        foreach ($_COOKIE as $key => $val) {
            if (substr($key, -2) === 'id' && !is_array($_COOKIE[$key])) {
                $newval        = preg_replace('/[^0-9a-zA-Z_-]/', '', $val);
                $_COOKIE[$key] = $HTTP_COOKIE_VARS[$key] = $newval;
                if ($_REQUEST[$key] == $_COOKIE[$key]) {
                    $_REQUEST[$key] = $newval;
                }
            }
        }

        return true;

discuss pic 2018-04-08 17:21:56
tad
不用去在意那些通知訊息
無關緊要的
關閉除錯即可。
:::

搜尋

QR Code 區塊

https%3A%2F%2Ftad0616.net%2Fmodules%2Ftad_discuss%2Fdiscuss.php%3FDiscussID%3D33936%26BoardID%3D17

線上使用者

29人線上 (11人在瀏覽討論留言)

會員: 0

訪客: 29

更多…