Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2009
    Location
    Stuart, FL
    Posts
    12,492
    Plugin Contributions
    88

    Default [Done v155a] Customer with last name of "Null" causes database error

    I came across this log on a v1.5.4 site today, issued on the create_account.php module's zen_db_perform call to create the customers-table record:
    Code:
    [04-Feb-2016 08:47:34 America/Chicago] PHP Fatal error:  1048:Column 'customers_lastname' cannot be null :: INSERT INTO customers (customers_firstname, customers_lastname, customers_email_address, customers_nick, customers_telephone, customers_fax, customers_newsletter, customers_email_format, customers_default_address_id, customers_password, customers_authorization) VALUES ('firstname', null, '[email protected]', '', '', '', '0', 'TEXT', '0', 'cdd9992bfad12df31a8a216826231b05:40', '0') ==> (as called by) /home/site_name/www/www/includes/functions/functions_general.php on line 1017 <== in /home/site_name/www/www/includes/classes/db/mysql/query_factory.php on line 155
    Based on the customer's email address being [email protected], I'm assuming that his last name is Null and that the string-handling in the zen_db_perform function is "over-handling" his name.

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

    Default Re: Customer with last name of "Null" causes database error

    Another instance of this issue presents itself (fresh Zen Cart 1.5.5) when searching for null:
    Code:
    [01-Apr-2016 12:41:38 America/New_York] Request URI: /zc155/index.php?main_page=advanced_search_result&search_in_description=1&keyword=null, IP address: ::1
    #1  trigger_error() called at [C:\xampp\htdocs\zc155\includes\classes\db\mysql\query_factory.php:167]
    #2  queryFactory->show_error() called at [C:\xampp\htdocs\zc155\includes\classes\db\mysql\query_factory.php:139]
    #3  queryFactory->set_error() called at [C:\xampp\htdocs\zc155\includes\classes\db\mysql\query_factory.php:266]
    #4  queryFactory->Execute() called at [C:\xampp\htdocs\zc155\includes\classes\split_page_results.php:78]
    #5  splitPageResults->__construct() called at [C:\xampp\htdocs\zc155\includes\modules\pages\advanced_search_result\header_php.php:462]
    #6  require(C:\xampp\htdocs\zc155\includes\modules\pages\advanced_search_result\header_php.php) called at [C:\xampp\htdocs\zc155\index.php:36]
    
    
    [01-Apr-2016 12:41:38 America/New_York] PHP Fatal error:  1064:You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 :: select count(distinct p.products_id) as total  FROM (products p              LEFT JOIN manufacturers m              USING(manufacturers_id), products_description pd, categories c, products_to_categories p2c )              LEFT JOIN meta_tags_products_description mtpd              ON mtpd.products_id= p2c.products_id              AND mtpd.language_id = 1 WHERE (p.products_status = 1                AND p.products_id = pd.products_id                AND pd.language_id = 1                AND p.products_id = p2c.products_id                AND p2c.categories_id = c.categories_id  ==> (as called by) C:\xampp\htdocs\zc155\includes\classes\split_page_results.php on line 78 <== in C:\xampp\htdocs\zc155\includes\classes\db\mysql\query_factory.php on line 167

 

 

Similar Threads

  1. v153 got error "Call to a member function value() on null"
    By su35 in forum General Questions
    Replies: 4
    Last Post: 25 Nov 2014, 03:02 AM
  2. Null for last name causes problems
    By shrimp-gumbo-mmmhhh in forum Bug Reports
    Replies: 0
    Last Post: 21 Dec 2010, 03:46 PM
  3. Moving "Additional Images" above "Attributes" causes color swatches to disappear
    By sonjamichelle in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 20 Mar 2009, 09:57 AM
  4. 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
  5. Replies: 1
    Last Post: 24 Nov 2007, 06:08 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