Zen Cart Logo
Forums / All Other Contributions/Addons / PHP Warning: Call-time pass-by-reference has been deprecated in class.ajax.php(addon)

PHP Warning: Call-time pass-by-reference has been deprecated in class.ajax.php(addon)

Locked

Views: 2,711

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
17 Aug 2010, 3:46 PM
#1
jabbawest avatar

jabbawest

Zen Follower

Join Date:
Oct 2009
Location:
Texas
Posts:
197
Plugin Contributions:
0

PHP Warning: Call-time pass-by-reference has been deprecated in class.ajax.php(addon)

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; ??

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!

Fine Jewelry For Any Budget
Sterling Leaf Jewelry
Rolling in the Zen

17 Aug 2010, 6:47 PM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
176

Re: PHP Warning: Call-time pass-by-reference has been deprecated in class.ajax.php(addon)

\includes\classes\class.ajax.phpThe file \includes\classes\class.ajax.php is not part of any current version of Zen Cart, so it must be something you've added, either from your own coding or from an addon.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

21 Aug 2010, 8:13 PM
#3
jabbawest avatar

jabbawest

Zen Follower

Join Date:
Oct 2009
Location:
Texas
Posts:
197
Plugin Contributions:
0

Re: PHP Warning: Call-time pass-by-reference has been deprecated in class.ajax.php(addon)

DrByte:

The file \includes\classes\class.ajax.php is not part of any current version of Zen Cart, so it must be something you've added, either from your own coding or from an addon.
You are correct, both JQZoom and JQlightbox use ajax.
Guess I'll head over there for more answers.

Thanks

Fine Jewelry For Any Budget
Sterling Leaf Jewelry
Rolling in the Zen