4images Forum & Community
4images Issues / Ausgaben => Discussion & Troubleshooting => Topic started by: Matthias70 on December 07, 2005, 06:43:55 PM
-
When I post a comment on my site. I have the following warning message
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:
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
-
Well, nothing wrong with that function, its how you use it.
Apperently u use it somewhere with a wrong "text" variable.
Trace back the changes you've made in details.php (like removing one-by-one multilang() function out of it.) and see where the error messages stops.
-
Hi V@no,
I found the problem :-)
$clickstream .= multilang($image_name)."</span>";
must be
$clickstream .= $image_name."</span>";
Thank you V@no
Matthias