Code:
function zen_back_link() {
if (sizeof($_SESSION['navigation']->path)-2 > 0) {
$back = sizeof($_SESSION['navigation']->path)-2;
$link = '<a href="' . zen_href_link($_SESSION['navigation']->path[$back]['page'], zen_array_to_string($_SESSION['navigation']->path[$back]['get'], array('action')), $_SESSION['navigation']->path[$back]['mode']) . '">';
} else {
if (isset($_SERVER['HTTP_REFERER']) && strstr(HTTP_SERVER, $_SERVER['HTTP_REFERER'])) {
$link= $_SERVER['HTTP_REFERER'];
} else {
$link = '<a href="' . zen_href_link(FILENAME_DEFAULT) . '">';
}
$_SESSION['navigation'] = new navigationHistory;
}
return $link;
}
looks like there is only one call to the strstr function there...only one thing i can imagine would be if the $_SERVER['HTTP_REFERER'] had a comma in it...strstr has two parameters + 1 optional.
http://us.php.net/manual/en/function.strstr.php
that last parameter is called before_needle, but acts much like a delimiter. I don't have an intimate knowledge of how PHP processes though...so I am not sure if that is really possible. But it IS a strange issue, i've never seen it before. Have you discovered anything else?
Bookmarks