Invalid argument supplied for foreach() /include/text.php on line 3082
When writing large posts with lots of links, sometimes the post itself is not displayed. Having encountered this problem before, i used to split the publication into parts in an attempt to shorten it. This time it was possible to trace the error that occurs when doing so:
[proxy_fcgi:error] AH01071: Got error 'PHP message: PHP Warning: Invalid argument supplied for foreach() in /include/text.php on line 3082PHP message: PHP Warning: Invalid argument supplied for foreach() in /include/text.php on line 3082PHP message: PHP Warning: Invalid argument supplied for foreach() in /include/text.php on line 3082PHP message: PHP Warning: Invalid argument supplied for foreach() in /include/text.php on line 3082PHP message: PHP Warning: Invalid argument supplied for foreach() /include/text.php on line 3082', referer: https://ussr.win/editpost/6549061
It's a parsing error, hovering over some strange circumstances. How to reproduce it:
Make a new post, paste this text and press 'Preview':
It will be ok.
Next add the thirteenth url tag (or paste this text) and press 'Preview':
The post will disappear and a error will appear in the log.
However, an error can also occur with smaller text (this is often the case when inserting two posts into one item using the share feature). The example given is about 40kb. But this example text is 10 times bigger, 400kb - there's no problem with it. You could add twice as many url tags and there would be no such error with this example. That is, the error is not due to the size of the text or the number of url tags - but due to a combination of some unspecified content parameters.