1
Discussion & Troubleshooting / Warning message when posting comment with multilang mod
« on: December 07, 2005, 06:43:55 PM »
When I post a comment on my site. I have the following warning message
I think it's a problem with the multilang mod, because the lines in functions.php are part of the multilang mod.
This is the code in functions.php:
Do you have any suggestions?
Matthias
Quote
Warning: preg_match() expects parameter 2 to be string, resource given in /www/htdocs/v030672/bildergalerie/includes/functions.php on line 1437
Warning: preg_match() expects parameter 2 to be string, resource given in /www/htdocs/v030672/bildergalerie/includes/functions.php on line 1441
Warning: preg_match() expects parameter 2 to be string, resource given in /www/htdocs/v030672/bildergalerie/includes/functions.php on line 1445
I think it's a problem with the multilang mod, because the lines in functions.php are part of the multilang mod.
This is the code in functions.php:
Code: [Select]
function multilang($text, $show_first = 0, $remove = 0){
global $config;
preg_match("#\[".$config['language_dir']."\](.*)(\[\/?".$config['language_list']."\]|$)#iDUs", $text, $match);
if (!empty($match[1])) {
return $match[1];
}
preg_match("#^(.*)\[".$config['language_list']."\]#iDUs", $text, $match);
if (!empty($match[1])) {
return $match[1];
}
preg_match("#\[".$config['language_dir_default']."\](.*)(\[\/?".$config['language_list']."\]|$)#iDUs", $text, $match);
if (!empty($match[1])) {
return $match[1];
}
Do you have any suggestions?
Matthias