Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2012
    Posts
    48
    Plugin Contributions
    0

    Default [Done v1.6.0] Redundant code in init_sanitize.php

    Code:
    /**
     * process all $_SESSION terms
     */
      if (isset($_SESSION) && count($_SESSION) > 0) {
        foreach($_SESSION as $key=>$value){
          if(is_array($value)){
            foreach($value as $key2 => $val2){
              unset($GLOBALS[$key]);  // <<-- shouldn't this be key2 ?
            }
          } else {
            unset($GLOBALS[$key]);
          }
        }
      }

  2. #2
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: init_sanitize.php

    It's actually redundant.

    The redundant code will be removed in v1.6.0.

    Leaving it as-is is harmless. THERE IS NO NEED TO APPLY THIS TO EXISTING SITES PRIOR TO UPGRADING TO 1.6.0

    THIS IS NOT A BUG. Merely inefficient code, probably leftover from some legacy components.
    .

    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.

 

 

Similar Threads

  1. Replies: 1
    Last Post: 14 Apr 2015, 09:08 PM
  2. v153 Paypal curl SSL3 - redundant code
    By mattd360 in forum Bug Reports
    Replies: 1
    Last Post: 13 Jan 2015, 07:33 AM
  3. Replies: 1
    Last Post: 21 Jul 2011, 04:29 PM
  4. blank screen on 1.3.9h after deleting init_sanitize.php
    By ray-the-otter in forum Upgrading from 1.3.x to 1.3.9
    Replies: 4
    Last Post: 1 Nov 2010, 11:44 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