Thousands of "Trying to access array offset on value of type null" - per day

Started by Mark S, May 18, 2021, 07:46:11 PM

Previous topic - Next topic

Mark S

No updates or mods made when this started happening.  It appears errors occur when anything is done, anywhere on the forum.
Same message appears, affecting the following files:

Sources/Gallery2.php  - line 1498, 1499
Themes/default/TPsubs.template.php(611) : eval()'d code  - line 249
Sources/subs-manageReactions.php  - line 171
Themes/default/Search.template.php - line 316


73 pages of errors.  1,793 today, so far.

Any additional info needed to help cure this?

Thanks!



Kindred

Update your mods.
Problems with a php version update, I would bet
Сл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."

Mark S

I didn't have any mods to update.  But, I deleted a couple I don't really use.  That didn't cure the problem though.  However, I'm getting this error now, again, triggered by any action anywhere in the forum.

8192: implode(): Passing glue string after array is deprecated. Swap the parameters
File: .../forum/Sources/Subs.php
Line: 5012


lines 1496 through 1503:

),
                        array(
'tag' => 'size',
'type' => 'unparsed_equals',
'test' => '([1-9][\d]?p[xt]|small(?:er)?|large[r]?|x[x]?-(?:small|large)|medium|(0\.[1-9]|[1-9](\.[\d][\d]?)?)?em)\]',
'before' => '<span style="font-size: $1;" class="bbc_size">',
'after' => '</span>',
                         ),


"Swap parameters"???



Edited to add code tags ~ Steve

@rjen

One of the errors is related to Tinyportal . What TinyPortal version are you on? You should update to the latest..
Running SMF 2.1 with latest TinyPortal at www.fjr-club.nl

shawnb61

Quote from: Mark S on May 28, 2021, 11:35:59 AM
I didn't have any mods to update.  But, I deleted a couple I don't really use.  That didn't cure the problem though.  However, I'm getting this error now, again, triggered by any action anywhere in the forum.

The following files are all from mods, & are not part of SMF:
Quote from: Mark S on May 18, 2021, 07:46:11 PM
Sources/Gallery2.php  - line 1498, 1499
Themes/default/TPsubs.template.php(611) : eval()'d code  - line 249
Sources/subs-manageReactions.php  - line 171

Some questions:
When you say you 'deleted' the mods - did you uninstall them first?
What version of PHP are you running?
What version of SMF are you running?

Note that the 'swap parameters' and the 'array offset on value of type null' errors are both caused by running old code on php 7.4. 

So...  I think there are at least two issues here.  The first is that you think mods are deinstalled, but they aren't.  The second is that your php version has been updated to something more current than your code supports.

Two possible courses of action:
- If your mods are properly installed & you want to keep them, you need to move your php version down to 7.2 or 7.3. 
- If you really don't mind losing all your mods, at this point, it might be appropriate to just upload a fresh set of files.  The only version of SMF that runs 7.4 is 2.0.18.  I would use that as a basis for refreshing your files.  More info on doing this here:
https://wiki.simplemachines.org/smf/How_to_upload_a_fresh_set_of_files
A question worth asking is born in experience & driven by necessity. - Fripp

Mark S

Sorry, yes.  I uninstalled those mods before deleting them.

I had been wondering if these errors are database related.

It seems doing an upgrade to the latest SMF version is what's needed.  Then, try to add whatever mods I had before which will still work on it.

Advertisement: