News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Error: Trying to access array offset on value of type null

Started by user58389239, June 02, 2023, 01:56:06 PM

Previous topic - Next topic

user58389239

I saw this error posted on the 2.0.X boards but not here and not for a while so I'm posting this here.

We are seeing this error in our logs, just 4 instances right now. They are all from Guests (who are allowed to view our forum but not post). Possibly from banned users but not sure?

Guest
 18.138.127.27
 bbe7810b283c705c75f7f9faa50203c8
 https://www.site.com/forum/index.php?topic=93304.msg796444
 /home/site/public_html/forum/Sources/Subs-Editor.php (Line 2272)
2: Trying to access array offset on value of type null

Guest
 3.143.170.91
 4efef9c956a7ce05c51b8dedf5e6eb18
 https://www.site.com/forum/index.php?topic=87492.0
 /home/site/public_html/forum/Sources/Subs-Editor.php (Line 2272)

Type of error: General
Error messageSelect
2: Trying to access array offset on value of type null


Here is what line 2272 of Subs-Editor.php says:

2262 // Have we got some questions to load?
2263 if (!empty($questionIDs))
2264 {
2265 $_SESSION[$verificationOptions['id'] . '_vv']['q'] = array();
2266 foreach ($questionIDs as $q)
2267 {
2268 // Bit of a shortcut this.
2269 $row = &$modSettings['question_id_cache']['questions'][$q];
2270 $thisVerification['questions'][] = array(
2271 'id' => $q,
2272 'q' => parse_bbc($row['question']),
2273 'is_error' => !empty($incorrectQuestions) && in_array($q, $incorrectQuestions),
2274 // Remember a previous submission?
2275 'a' => isset($_REQUEST[$verificationOptions['id'] . '_vv'], $_REQUEST[$verificationOptions['id'] . '_vv']['q'], $_REQUEST[$verificationOptions['id'] . '_vv']['q'][$q]) ? $smcFunc['htmlspecialchars']($_REQUEST[$verificationOptions['id'] . '_vv']['q'][$q]) : '',
2276 );
2277 $_SESSION[$verificationOptions['id'] . '_vv']['q'][] = $q;
2278 }
2279 }


Here is the pertinent info I've seen requested elsewhere:
Forum Version: 2.1.3
PHP Version: 8.0.28
MySQL Version:    10.6.13

Forum Language is English
global_character_set is set to UTF-8

Only package installed is Ultimate Menu v.2.0.2

Kindred

Looks like both reports of this error have the menu mod installed....  try removing that
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

user58389239

Argh I really don't want to because we rely pretty heavily on that menu...the errors are pretty infrequent and only for Guests so I'm not sure what to make of it right now.

live627

Quote from: Kindred on June 02, 2023, 04:31:40 PMLooks like both reports of this error have the menu mod installed....  try removing that
link me to the other one

Kindred

I can't seem to find it now....     but the other user complained about the same thing and the only overlap was that mod....
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Advertisement: