Ich habe ein Plugin, das strpos() -Methode verwendet und auf einer Website Ich erhalte diesen FehlerWarnung: strpos() [function.strpos]: Leere Begrenzer
Warning: strpos() [function.strpos]: Empty delimiter. in /home/mysite/public_html/wp-includes/compat.php on line 55
Irgendwelche Ideen, was die wahrscheinliche Ursache das könnte sein?
Auszug aus compat.php
if (!function_exists('stripos')) {
function stripos($haystack, $needle, $offset = 0) {
return strpos(strtolower($haystack), strtolower($needle), $offset);
}
}
Mein Code ...
function myFunction($thePost)
{
$theContent = $thePost->post_content;
$myVar1 = array();
preg_match_all('/<a\s[^>]*href=\"([^\"]*)\"[^>]*>(.*)<\/a>/siU',$theContent,$myVar1);
$myVar2 = 0;
foreach ($myVar1[1] as $myVar3)
{
$myVar4 = $myVar1[2][$myVar2];
$myVar5 = FALSE;
$myVar6 = get_bloginfo('wpurl');
$myVar7 = str_replace('http://www.','',$myVar3);
$myVar7 = str_replace('http://','',$myVar7);
$myVar8 = str_replace('http://www.','',$myVar6);
$myVar8 = str_replace('http://','',$myVar8);
if (strpos($myVar3,'http://')!==0 || strpos($myVar7,$myVar8)===0) return TRUE;
$myVar2++;
}
return FALSE;
}
Poste bitte deinen PHP-Code, wir können nicht erraten, was du mit der Funktion gemacht hast –
Und hast du tatsächlich _looked_ in Zeile 55 von /home/mysite/public_html/wp-includes/compat.php? Meine psychischen Debugging-Fähigkeiten sind für Raymond Chens keine Lösung, aber selbst ich kann herausfinden, dass das wahrscheinlich der beste Ort ist, um anzufangen :-) – paxdiablo
http://stackoverflow.com/questions/4105067/php-what-does-warning-strpos-function -strpos-empty-delimiter-in-mean – Phil