Support Forum

Error in the Apache Log: Mentions plugin

BF Blaise F
Blaise F
Member

Hi,

I am getting the following error in my apache error log:

mod_fcgid: stderr: PHP Warning – preg_match_all(): Compilation failed: invalid range in character class at offset 7 – file: /forum-plugins/mentions/library/sp-mentions-components.php – line: 18 – function: preg_match_all.

Line 18 in bold below:

function sp_mentions_find_mentions($content) {
preg_match_all(‘/B@([w-.]+)b/’, $content, $matches);
if ($matches) {
$names = $matches[1];
} else {
$names = array();
}

return $names;
}

4 Answers

New Answer

BF Blaise F
Blaise F
Member

This is due to php 7.3

I had this problem in different areas of my site.

I solved this with your plugin by changing line 18 as follows (there is 1 tiny change hard to spot: an extra /)

preg_match_all(‘/B@([w-.]+)b/’, $content, $matches);

SP Simple Press
Simple Press
Admin

Hi:

Thanks – we’ll take a look at it and push an update if necessary.

One thing to look for is to see if the change causes a “compilation failed: invalid range” message.  

Thanks.

BL Blaise
Blaise
Member

Hi,

Has my fix been integrated in the plugin? The fix solves the errors in the logs and does not create additional errors.

thanks

SS SP Community Support
SP Community Support
Admin

Hi:

Version 3.1.1 should have resolved this issue. If you install the premium installer (available from your account downloads if you don’t already have it), it should give you the latest version automatically.

Thanks.