I've been receiving more than a few 500 errors recently so I thought I'd run a php debug and here's what I've found.
Not sure if the error in this log is what's causing the 500 but I may as well fix it.
[17-Aug-2010 08:25:01] PHP Warning: Call-time pass-by-reference has been deprecated; If you would like to pass it by reference, modify the declaration of in_array(). If you would like to enable call-time pass-by-reference, you can set allow_call_time_pass_reference to true in your INI file in D:\Hosting\5096134\html\includes\classes\class.ajax.php on line 389
and here is what I see from ling 377-399.
Should I try, as suggested in the log and set the return false; to return true; ??
PHP Code:
function recursiveInArray($needle, $haystack) {
foreach ($haystack as $key => $stalk) {
if (($key === $needle) || ($needle === $stalk) || (is_array($stalk) && $this->recursiveInArray($needle, $stalk))) {
return true;
}
}
return false;
}
}
function print_nice($elem,$max_level=10,$print_nice_stack=array()){
if(is_array($elem) || is_object($elem)){
if(in_array(&$elem,$print_nice_stack,true)){
echo "<font color=red>RECURSION</font>";
return;
}
$print_nice_stack[]=&$elem;
if($max_level<1){
echo "<font color=red>nivel maximo alcanzado</font>";
return;
}
Thank you!
Bookmarks