News:

Want to get involved in developing SMF? Why not lend a hand on our GitHub!

Main Menu

2: Undefined array key 7 appears in error log when just browsing forum

Started by realvanyek, June 26, 2023, 02:37:55 PM

Previous topic - Next topic

realvanyek

here are some details:

hxxp:forum.therealvanyek.ml/index.php?action=admin;area=logs;sa=errorlog;desc [nonactive]
/path/to/smf/Sources/Subs.php (Line 4570)
Type of error: Undefined
Error message:[Select]
2: Undefined array key 7

not sure if i need to post in that category

Kindred

please include the code from lines 4560-4580 in your subs.php
Сл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."

Steve

My pet rock is not feeling well. I think it's stoned.

realvanyek

Quote from: Kindred on June 27, 2023, 10:46:26 AMplease include the code from lines 4560-4580 in your subs.php
sorry for late reply, but here it is:
call_integration_hook('integrate_security_files', array(&$securityFiles));

foreach ($securityFiles as $i => $securityFile)
{
if (!file_exists($boarddir . '/' . $securityFile))
unset($securityFiles[$i]);
}

// We are already checking so many files...just few more doesn't make any difference! :P
if (!empty($modSettings['currentAttachmentUploadDir']))
$path = $modSettings['attachmentUploadDir'][$modSettings['currentAttachmentUploadDir']];

else
$path = $modSettings['attachmentUploadDir'];

secureDirectory($path, true);
secureDirectory($cachedir);

// If agreement is enabled, at least the english version shall exist
if (!empty($modSettings['requireAgreement']))
$agreement = !file_exists($boarddir . '/agreement.txt');

realvanyek

btw the problem was in the attachments dir path, but now it's solved

Advertisement: