Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,681
    Plugin Contributions
    123

    Default Additional check in zen_run_normal()

    Suggestion: Change includes/functions/functions_lookups.php zen_run_normal() from

    case (strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])):

    to

    case (!empty(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE) && strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR'])):


    Prevents log:
    [31-Mar-2015 09:01:33 America/Los_Angeles] PHP Warning: strstr(): Empty delimiter in /home/customer/public_html/includes/functions/functions_lookups.php on line 715
    That Software Guy. My Store: Zen Cart Modifications
    Available for hire - See my ad in Services
    Plugin Moderator, Documentation Curator, Chief Cook and Bottle-Washer.
    Do you benefit from Zen Cart? Then please support the project.

  2. #2
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,474
    Plugin Contributions
    88

    Default Re: Additional check in zen_run_normal()

    The log actually comes because the $_SERVER['REMOTE_ADDR'] (the needle) is empty, so the check/correction should read:
    Code:
    case (!empty($_SERVER['REMOTE_ADDR']) && strstr(EXCLUDE_ADMIN_IP_FOR_MAINTENANCE, $_SERVER['REMOTE_ADDR']));
    There were a couple of other cases where the $_SERVER['REMOTE_ADDR'] variable is checked in this manner, creating similar log entries if the value is empty. I'm pretty sure that DrByte had posted a solution somewhere (??) whereby the change for v1.6.0 is to check early on in the initialization and set the variable so that it's never empty.

 

 

Similar Threads

  1. Replies: 1
    Last Post: 19 Sep 2012, 04:11 AM
  2. adding additional check out option
    By Snaggle in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 2 Dec 2011, 01:45 AM
  3. File attribute not working - its something to do with zen_run_normal()??
    By infocom in forum Setting Up Categories, Products, Attributes
    Replies: 0
    Last Post: 2 Apr 2008, 11:47 AM
  4. Additional Images - Template Issue Check my Code
    By ryanwithanr in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 28 Jun 2007, 10:09 AM

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