Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2009
    Location
    Texas
    Posts
    194
    Plugin Contributions
    0

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

    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!

  2. #2
    Join Date
    Jan 2004
    Posts
    66,350
    Blog Entries
    7
    Plugin Contributions
    271

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

    \includes\classes\class.ajax.php
    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.
    .

    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.

  3. #3
    Join Date
    Oct 2009
    Location
    Texas
    Posts
    194
    Plugin Contributions
    0

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

    Quote Originally Posted by DrByte View Post
    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

 

 

Similar Threads

  1. v154 PHP Fatal error Call-time pass-by-reference - tpl_yahootreemenu.php
    By RubenZ in forum Upgrading to 1.5.x
    Replies: 3
    Last Post: 6 Feb 2015, 05:24 PM
  2. v153 PHP Warning: putenv() has been disabled for security reasons
    By Thannaree in forum General Questions
    Replies: 2
    Last Post: 2 Jan 2015, 05:28 AM
  3. backup_mysite.php: Assigning the return value of new by reference is deprecated
    By samar777 in forum All Other Contributions/Addons
    Replies: 0
    Last Post: 12 Feb 2010, 04:25 AM
  4. Probelms with UPS XML shipping mod: Call-time pass-by-reference has been deprecated
    By letsconservenow.com in forum Addon Shipping Modules
    Replies: 0
    Last Post: 29 May 2009, 07:54 PM
  5. Call-time pass-by-reference deprecated
    By matrixman in forum Installing on a Linux/Unix Server
    Replies: 3
    Last Post: 24 Feb 2007, 02:16 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR