Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Solved: 1 Year, 1 Week ago Error message saying # is an "unknown modifier"
#1
Solved: 1 Year, 1 Week ago
Error message saying # is an "unknown modifier". after upgrading to latest version (and the one before that).

The line causing the problem is line 659 in class_parser.php:

$message = preg_replace('#'.$badword['badword'].'#is', $badword['replacement'], $message);


Why would I be getting that error message with the latest version of MyBB. I'm running PHP 7.1.

The problem occurs with 1.8.18 and 1.8.19.

This is a standard line of code from MyBB so presumably there is something in my PHP environment that conflicts with this. Any ideas?
Reply
#2
Solved: 1 Year, 1 Week ago
Have a look @ https://community.mybb.com/thread-220127.html
[MyBB 1.8 mods] - Offer me a coffee
Do not ask me help through PM
Reply
#3
Solved: 1 Year, 1 Week ago
(10-09-2018, 10:03 AM)Crazycat Wrote: Have a look @ https://community.mybb.com/thread-220127.html

That's just asking the same question.

I need to know the answer! Huh
Reply
#4
Solved: 1 Year, 1 Week ago
(10-09-2018, 04:07 PM)broadsword Wrote:
(10-09-2018, 10:03 AM)Crazycat Wrote: Have a look @ https://community.mybb.com/thread-220127.html

That's just asking the same question.

I need to know the answer! Huh

Ahem...

The answer is in that thread. 

Why do you keep making the same thread in different forums? That will not help you at all.
I'm Serpius and You're Not    ¯\_(ツ)_/¯
[Image: y3xr3cj5]
Reply
#5
Solved: 1 Year, 1 Week ago
(10-09-2018, 04:46 PM)Serpius Wrote:
(10-09-2018, 04:07 PM)broadsword Wrote:
(10-09-2018, 10:03 AM)Crazycat Wrote: Have a look @ https://community.mybb.com/thread-220127.html

That's just asking the same question.

I need to know the answer! Huh

Ahem...

The answer is in that thread. 

Why do you keep making the same thread in different forums? That will not help you at all.



The answer is not in that thread - or this one! Huh

I created a new thread as this one describes the underlying cause rather than just describing one of the symptoms.

The first one is clearly misleading people, including you, hence why it's been closed to further comments.
Reply
#6
Solved: 1 Year, 1 Week ago
So, read https://github.com/mybb/mybb/pull/3353#i...-413702257 and check your badwords :
Quote:Effect: The dynamic word filters (using symbols to catch unknown characters) already set by admins will not work as intended due to the logic change in symbol (*) usage. From now onwards the symbols '*' (any number of any character) and '+' (one number of any character) will be used efficiently. For example: *on* will catch 'congo', 'ontology' or 'moron'. However, on+ will catch 'one' it will not catch 'ton' or 'onion'. my++ will catch 'mybb' and 'myth', but will not catch 'mya','mummy' or 'mystery'.

Corrective Action: Admins are required to edit all the already existing dynamic word filters and define the word as per the new logic to achieve intended behavior.
[MyBB 1.8 mods] - Offer me a coffee
Do not ask me help through PM
Reply
#7
Solved: 1 Year, 1 Week ago
Good news. Sorted. I found a bad word which included a '#'.

So even without regex being active, this was being treated as an escape character.

A slightly unusual case but hope someone else finds this useful. Might be worth escaping these in a future release.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)