[2.0] Invalid argument supplied for foreach

Started by inter, February 28, 2018, 10:28:08 AM

Previous topic - Next topic

inter

smf: 2.0.15
php: 7.1
url: http://.../index.php?action=who
Error: Invalid argument supplied for foreach()
File: /.../Sources/Who.php
Line: 227
Sorry for my English

Kindred

yes, and?

You don't give the code from around that line....
You don't give a list of mods installed.

since that doesn't happen in an unmodified installation, it suggests that one of your mods is not working.
Сл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."

inter

I have many mods installed, but it's probably not the case.




My dump $modSettings['spider_name_cache']:
Result: big string
(see in attach)

My dump safe_unserialize($modSettings['spider_name_cache']):
Result: bool(false)
Sorry for my English

inter

sorry, I found it was my fault.

in my file Subs.php in the function _safe_unserialize($str) was the code:
&& $matches[1] < 256)
this code should not be.

solved.
Sorry for my English

inter

hmmm...
this code was added in the smf_patch_2.0.12.zip
and if then I update the forum with patches then this code was not corrected.
(maybe I'm wrong)
Sorry for my English

Advertisement: