Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: woolly bugger on November 19, 2020, 10:38:11 AM

Title: a couple of new errors started to pop up...
Post by: woolly bugger on November 19, 2020, 10:38:11 AM
 Type of error: General
2: Invalid argument supplied for foreach()
 https://www.brfff.com/forum/index.php?action=search2
 /home/public_html/forum/Sources/Search.php (Line 886)


Backtrace information Type of error: General
8: Trying to access array offset on value of type null
 https://www.brfff.com/forum/index.php?action=printpage;topic=14542.0;images
 /home/public_html/forum/Sources/Printpage.php (Line 234)

2.1 RC3
just switched to php 7.4

2   Simple Audio Video Embedder   5.1.4   November 02, 2020, 12:59:37 P
7   Forum Width Setting   1.2   November 02, 2020, 13:01:16 PM   
20   Ad Managment   3.5d   November 02, 2020, 13:02:18 PM
15   Report BBC   1.0.0   November 02, 2020, 13:03:13 PM   
5   SMF Gallery Lite   6.0d   November 02, 2020, 13:03:34 PM   
11   Google Analytics Code   1.5.1   November 02, 2020, 13:04:06 PM   
17   FancyBox 4 SMF   0.7.2   November 02, 2020, 13:05:35 PM
13   Tapatalk SMF 2.1 Plugin   5.0.1   November 04, 2020, 19:30:34 PM   
9   Hide Images From Guests   2.1   November 05, 2020, 15:57:16 PM
19   EzPortal   4.5.11   November 17, 2020, 22:31:17 PM
Title: Re: a couple of new errors started to pop up...
Post by: Oldiesmann on November 22, 2020, 12:29:44 AM
The first error appears to be related to spell checking. It's possible that pspell or enchant didn't get installed when you switched to PHP 7.4.

The spell check functionality is scheduled to be removed (https://github.com/SimpleMachines/SMF2.1/pull/6304) in the next version, but for now you should be able to fix that error by adding this code to Search.php:

Find
Code: [Select]
$suggestions = spell_suggest($link, $word);
Add after that
Code: [Select]
if (!is_array($suggestions))
$suggestions = array();

I have no idea what could be causing the other error as this is what I have on line 234 in my copy of Printpage.php:
Code: [Select]
$context['post_time'] = timeformat($row['poster_time'], false);
Title: Re: a couple of new errors started to pop up...
Post by: woolly bugger on November 22, 2020, 10:40:18 AM
may have been an issue with TapaCrap as I removed it and am no longer having these errors