Jump to content

Recommended Posts

this is from a php CMS i been to there site and they keep trying to fix this error but keep failing im praying that maybe with adding a few more heads we can find out whats wrong with this code

 

error is

Warning: preg_match() [function.preg-match]: Unknown modifier 'w' in E:\Webserver\xampp\htdocs\php_nuke_eve\blocks\block-Sommaire.php on line 500

 

line 500

            elseif($moduleinthisgroup[$som_groupmenu][$keyinthisgroup]=="Lien externe" && !preg_match("@modules.php?name=@i", $linkinthisgroup[$som_groupmenu][$keyinthisgroup]) && !preg_match("@((http(s)?)|(ftp(s)?))://@i".$_SERVER['SERVER_NAME']."/modules.php\?name=",$linkinthisgroup[$som_groupmenu][$keyinthisgroup])) { 

 

if you delete the last !preg_match then there no errors so i believe it has something to do with that line of code

 

 

full page code is to long so will just upload it

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/227016-i-pray-someone-can-help-lol/
Share on other sites

I kinda find it odd that the makers/support staff of a CMS would fail to catch this error...anyways...problem is that you are using @ as the regex delimiter but you have it in the middle of the pattern instead of at the end.

 

  elseif($moduleinthisgroup[$som_groupmenu][$keyinthisgroup]=="Lien externe" && !preg_match("@modules.php?name=@i", $linkinthisgroup[$som_groupmenu][$keyinthisgroup]) && !preg_match("@((http(s)?)|(ftp(s)?))://".$_SERVER['SERVER_NAME']."/modules.php\?name=@i",$linkinthisgroup[$som_groupmenu][$keyinthisgroup])) { 

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.