×
Blue Eagle 5 v1.5.3 has been Released (31 Mar 2020)

The Kunena team has announce the arrival of Kunena template Blue Eagle 5 v1.5.3 which is now available for download. This version addresses most of the issues that were discovered in development.

Question preg_replace_callback() error

More
1 year 1 month ago #1 by theITfactor
Hi,

I'm getting a preg_replace_callback() error:
Warning: preg_replace_callback(): Compilation failed: invalid range in character class at offset 18 in /***/components/com_kunena/views/topics/view.html.php on line 203
Line 203:
$contents = preg_replace_callback('|\[K=(\w+)(?:\:([\w-_]+))?\]|', array($this, 'fillTopicInfo'), $contents);

I put that regex through Debuggex tester and it's saying that you cannot use "\w" as the start of a range

Please Log in or Create an account to join the conversation.

More
1 year 1 month ago - 1 year 1 month ago #2 by theITfactor
Maybe escaping the - after \w would fix it? also in line 212
$contents = preg_replace_callback('|\[K=(\w+)(?:\:([\w\-_]+))?\]|', array($this, 'fillTopicInfo'), $contents);
Last edit: 1 year 1 month ago by theITfactor.

Please Log in or Create an account to join the conversation.

More
1 year 1 month ago #3 by rich

Please Log in or Create an account to join the conversation.

  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Time to create page: 0.085 seconds