Thread: Error Message

Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2008
    Location
    Sydney Australia
    Posts
    602
    Plugin Contributions
    0

    Default Error Message

    Server Info:

    Server OS: Linux 4.18.0-553.27.1.lve.el8.x86_64
    Server Date: 26/01/2025 23:23:54
    Server Up Time: Disabled/Unavailable
    HTTP Server: Apache
    PHP Version: 8.1.31 (Zend: 4.1.31)
    PHP File Uploads: On
    Upload Max Size: 1024M
    PHP Memory Limit: -1
    POST Max Size: 1024M
    Database Engine: MySQL 10.6.20-MariaDB-cll-lve
    Database Host: localhost (xxxx)
    Database Date: 26/01/2025 23:23:54
    Database Data Size: 434,469 kB
    Database Index Size: 95,651 kB
    MySQL Slow Query Log Status: Off
    MySQL Slow Query Log File: xxxl494161-slow.log
    MySQL Mode: NO_ENGINE_SUBSTITUTION

    I am getting this error message:
    [26-Jan-2025 12:35:54 Australia/Sydney] Request URI: /index.php?main_page=addon_reviews_reminder_optout, IP address: 220.244.78.72, Language id 1
    #0 /includes/modules/pages/addon_reviews_reminder_optout/header_php.php(10): zen_debug_error_handler()
    #1 /index.php(35): require('/home/...')
    --> PHP Warning: Undefined array key "customer_id" in /includes/modules/pages/addon_reviews_reminder_optout/header_php.php on line 10.

    This is what is in the file:

    if (!$_SESSION['customer_id']) {
    $_SESSION['navigation']->set_snapshot();
    zen_redirect(zen_href_link(FILENAME_LOGIN, '', 'SSL'));
    }

    require(DIR_WS_MODULES . zen_get_module_directory('require_languages.php'));
    $breadcrumb->add(NAVBAR_TITLE);

    #PROCESS OPT OUT REQUEST
    if( isset($_POST['optOutToken']) and $_POST['optOutToken'] == md5( (int)$_SESSION['customer_id'] * 5 ) ){
    $sql = "INSERT IGNORE INTO `" . TABLE_ADDON_REVIEW_REMINDER_OPTOUT . "` (`customers_id`, `date_time`)
    VALUES ('" . zen_db_prepare_input( (int)$_SESSION['customer_id'] ) . "','" . date("Y-m-d H:i:s") . "')";
    $db->Execute($sql);
    }
    ?>

    Can anyone tell me what I need to change to correct the error message please.

  2. #2
    Join Date
    Jul 2012
    Posts
    16,797
    Plugin Contributions
    17

    Default Re: Error Message

    What have to do and what might make sense in review of just the problem area:
    Changing:
    Code:
    if (!$_SESSION['customer_id']) {
    To at least:
    Code:
    if (empty($_SESSION['customer_id'])) {
    Considering using Zen Cart 1.5.8, there is now also a function that checks for being logged in and allows for the possibility of accessing something by not actually having an account but having been "logged in".

    Would have to review for more detail about whether those type customers should even be allowed to continue in that file.

    The above though will basically follow the same action as previous for users that have created an account.
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. Replies: 7
    Last Post: 16 Dec 2018, 10:02 PM
  2. Authorize.net error message with no error message?
    By swamyg1 in forum Built-in Shipping and Payment Modules
    Replies: 12
    Last Post: 19 Nov 2010, 12:32 AM
  3. 500 Error - FastCGI error message after database installation page.
    By hungoveragain in forum Installing on a Windows Server
    Replies: 8
    Last Post: 24 Sep 2010, 03:37 PM
  4. PCI error: Potentially Exploitable Database Error Message -- links_alias table
    By srigari in forum All Other Contributions/Addons
    Replies: 5
    Last Post: 21 Jun 2009, 12:23 AM
  5. error message 1064 you have an error in your sql syntax
    By ngsl in forum General Questions
    Replies: 0
    Last Post: 22 Aug 2008, 06:44 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