Bored? Looking to kill some time? Want to chat with other SMF users? Join us in IRC chat or Discord
Quote from: grinninglich on November 07, 2017, 12:13:54 PM
Can anyone redirect me to fix of error below. Author says it is in the thread but where in all 137 pages?
preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
Sources/Shoutbox.php
Line: 316
Quote from: Steve on November 08, 2017, 04:40:41 PM
click here
Quote from: @rjen on June 30, 2017, 02:44:18 AM
I am getting this error in the logs since I am on PHP7.1 and a user apparently uses long words that need ' fixing'
hxxp://xxxx/index.php?action=shoutbox;sa=send;sesc;xml;row=40
2: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
Bestand: /home/xxxx/public_html/Sources/Shoutbox.php
Regel: 316
310: if (strlen($msg) > $shoutbox['fixLongWords'])
311: {
312: $msg = strtr($msg, array($breaker => '< >', ' ' => $context['utf8'] ? "\xC2\xA0" : "\xA0"));
313: $msg = preg_replace(
314: '~(?<=[>;:!? ' . $non_breaking_space . '\]()]|^)([\w\.]{' . $shoutbox['fixLongWords'] . ',})~e' . ($context['utf8'] ? 'u' : ''),
315: 'preg_replace(\'/(.{' . ($shoutbox['fixLongWords'] - 1) . '})/' . ($context['utf8'] ? 'u' : '') . '\', \'\\$1< >\', \'$1\')',
==>316: $msg);
317: $msg = strtr($msg, array('< >' => $breaker, $context['utf8'] ? "\xC2\xA0" : "\xA0" => ' '));
318: }
310: if (strlen($msg) > $shoutbox['fixLongWords'])
311: {
312: $msg = strtr($msg, array($breaker => '< >', ' ' => $context['utf8'] ? "\xC2\xA0" : "\xA0"));
313: $msg = preg_replace(
314: '~(?<=[>;:!? ' . $non_breaking_space . '\]()]|^)([\w\.]{' . $shoutbox['fixLongWords'] . ',})~e' . ($context['utf8'] ? 'u' : ''),
315: 'preg_replace(\'/(.{' . ($shoutbox['fixLongWords'] - 1) . '})/' . ($context['utf8'] ? 'u' : '') . '\', \'\\$1< >\', \'$1\')',
==>316: $msg);
317: $msg = strtr($msg, array('< >' => $breaker, $context['utf8'] ? "\xC2\xA0" : "\xA0" => ' '));
318: }