Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2005
    Posts
    189
    Plugin Contributions
    0

    Default [Done v2.0] minor? syntax error in jscript_main.php

    Hello,

    Looking at the following file using netbeans IDE, i got a syntax error highlighted on line 156, indicating unterminated string literal.

    \includes\modules\pages\address_book_process\jscript_main.php

    check_state(<?php echo (int)ENTRY_STATE_MIN_LENGTH . ', "' . ENTRY_STATE_ERROR . '", "' . ENTRY_STATE_ERROR_SELECT; ?>");

    Looking at the code its apparent that the last " is too much. Removing it, removes the error.

    Same error also existed in file

    account_edit/jscript_form_check.php, although on a different line (don't know anymore which).

    account_password/jscript_form_check.php also on line 156.

    I presume that all those files have this error.

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

    Default Re: minor? syntax error in jscript_main.php

    Well, your IDE is a little overzealous.

    The code is actually correct in that it produces valid output.
    However, it's written in a way that's not friendly to your IDE's syntax validator.

    You can safely ignore your IDE's warning. "Fixing" it in the manner you described will cause your site to generate invalid javascript output, thus resulting in broken functionality in your store.

    We will fix the syntax of this section to be more friendly to IDE validators in v2.0
    .

    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.

  3. #3
    Join Date
    Sep 2005
    Posts
    189
    Plugin Contributions
    0

    Default Re: [Done v2.0] minor? syntax error in jscript_main.php

    thanks for the warning.

    BTW, it appears to me that all of those files are clones, although the pages they belong to don't have many of the input fields that the validation code checks. Is this so,or am i misunderstanding the code.

    thanks,

  4. #4
    Join Date
    Jan 2004
    Posts
    66,363
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: [Done v2.0] minor? syntax error in jscript_main.php

    There is some sharing of common code for simplicity. They are not necessarily all direct clones.
    .

    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. v152 [Done v1.5.2] minor typo in option_name.php language file
    By torvista in forum Bug Reports
    Replies: 1
    Last Post: 4 Dec 2013, 08:19 PM
  2. [Done] v1.5.0BETA Spanish Zones minor error
    By torvista in forum Bug Reports
    Replies: 2
    Last Post: 7 Aug 2011, 11:34 PM
  3. [Done v1.5.0] minor email table error in orders.php
    By torvista in forum Bug Reports
    Replies: 3
    Last Post: 1 Sep 2010, 08:48 AM
  4. Replies: 0
    Last Post: 16 Nov 2007, 11:35 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