Results 1 to 7 of 7
  1. #1
    Join Date
    Jun 2005
    Posts
    309
    Plugin Contributions
    0

    Default Edit customer depriciated null string on customer referal

    [Note: remember to include site URL, ZC version, list of plugins, PHP version, etc ... read the Posting Tips shown above for information to include in your post here.
    And, remove this comment before actually posting!]
    pezcollectors.com, 1.5.8a, PHP 8.1.24
    verified admin/customers.php IS stock unmodified

    Editing any customer throws the error below. Looks like its because of the empty customer referral.
    [16-Oct-2023 08:48:52 America/Chicago] Request URI: /nimda123/index.php?cmd=customers&page=1&cID=25052&action=edit, IP address: 73.67.37.4, Language id 1
    #0 [internal function]: zen_debug_error_handler()
    #1 /nimda123/customers.php(1061): htmlspecialchars()
    #2 /nimda123/index.php(11): require('/home/pcs/publi...')
    --> PHP Deprecated: htmlspecialchars(): Passing null to parameter #1 ($string) of type string is deprecated in /nimda123/customers.php on line 1061.
    2 + 2 = 5 for extremely large values of 2

    Pez Collectors Store

  2. #2
    Join Date
    Jun 2005
    Posts
    309
    Plugin Contributions
    0

    Default Re: Edit customer depriciated null string on customer referal

    The answer is in the upgrading to 1.5.8 doc.
    Line 1058 should be changed from:
    Code:
    $cInfo->customers_referral,
    to:
    Code:
    $cInfo->customers_referral ?? '',
    2 + 2 = 5 for extremely large values of 2

    Pez Collectors Store

  3. #3
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,534
    Plugin Contributions
    88

    Default Re: Edit customer depriciated null string on customer referal

    Quote Originally Posted by gothstone View Post
    The answer is in the upgrading to 1.5.8 doc.
    Line 1058 should be changed from:
    Code:
    $cInfo->customers_referral,
    to:
    Code:
    $cInfo->customers_referral ?? '',
    Where did you find this documented (a link, please)? I'm asking because the customers::customers_referral field has been defined as NOT NULL default '' since at least Zen Cart 1.5.5.

  4. #4
    Join Date
    Jun 2005
    Posts
    309
    Plugin Contributions
    0

    Default Re: Edit customer depriciated null string on customer referal

    https://docs.zen-cart.com/dev/plugins/upgrading_to_158/
    "PHP 8.1 and null strings passed as parameters"
    was almost identical to my issue.

    I don't see anything about it in my upgrade exceptions, but I DO see that my clean blank 1.5.8 reference DB is set to Null NO with no default. My actual DB is Null Yes Default Null.

    It looks like it was always blank until Dec 2011 which corresponds to an upgrade of edit orders, and numinix endicia exporter, and probably a few others. So I'm sure one of my mods went sideways and caused this.

    So set default to blank, wipe out the nulls, and set null to no?
    2 + 2 = 5 for extremely large values of 2

    Pez Collectors Store

  5. #5
    Join Date
    Jun 2005
    Posts
    309
    Plugin Contributions
    0

    Default Re: Edit customer depriciated null string on customer referal

    Ugh. Comparing the clean to current, I have a LOT of cleanup/fixing to doName:  Screenshot 2023-10-17 083931.jpg
Views: 54
Size:  73.3 KB
    2 + 2 = 5 for extremely large values of 2

    Pez Collectors Store

  6. #6
    Join Date
    Jun 2005
    Posts
    309
    Plugin Contributions
    0

    Default Re: Edit customer depriciated null string on customer referal

    So thinking on this, clearly I can't trust my database structure. Feel free to move this to another section of the forum, clearly this is NOT a bug in ZC.
    I plan to do the following:
    1. Create another dev site with a clean ZC_install with a blank DB
    2. Drop my prod fileset on top
    3. Log into admin, let my mods install
    4. Drop on any manual SQL installed for any of my mods
    5. Make sure all mods are active and installed
    6. Compare structure of THAT DB to my current
    7. Build SQL statements to fix all structure and data to align

    Does anyone have suggestions on good tools to help with the structure comparison and data correction?
    2 + 2 = 5 for extremely large values of 2

    Pez Collectors Store

  7. #7
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,534
    Plugin Contributions
    88

    Default Re: Edit customer depriciated null string on customer referal

    Quote Originally Posted by gothstone View Post
    Ugh. Comparing the clean to current, I have a LOT of cleanup/fixing to doName:  Screenshot 2023-10-17 083931.jpg
Views: 54
Size:  73.3 KB
    Yikes, the only nullable fields in a standard Zen Cart database are the customers_fax and customers_newsletters fields!

 

 

Similar Threads

  1. Replies: 1
    Last Post: 1 Apr 2022, 06:58 AM
  2. Customer Referal Box
    By helpme in forum General Questions
    Replies: 5
    Last Post: 9 Jul 2008, 02:13 PM
  3. Customer with last name 'Null' Can't place order.
    By Sigel in forum PayPal Website Payments Pro support
    Replies: 6
    Last Post: 10 Jun 2008, 03:46 AM
  4. customer referal
    By bidsea in forum General Questions
    Replies: 2
    Last Post: 7 Apr 2007, 11:38 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