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

    Default [Done v1.6.0] zen_has_product_attributes_downloads_status() returns incorrect result

    File: includes/functions/functions_lookups.php. This function is backwards!

    line 873 should be

    Code:
    if ($download_display->RecordCount() == 0) {
    not

    Code:
    if ($download_display->RecordCount() != 0) {
    Last edited by swguy; 27 Nov 2015 at 02:18 PM.
    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
    Nov 2007
    Location
    Sunny Coast, Australia
    Posts
    3,379
    Plugin Contributions
    9

    Default Re: [Done v1.6.0] zen_has_product_attributes_downloads_status() returns incorrect res

    Quote Originally Posted by swguy View Post
    File: includes/functions/functions_lookups.php. This function is backwards!

    line 873 should be

    Code:
    if ($download_display->RecordCount() == 0) {
    not

    Code:
    if ($download_display->RecordCount() != 0) {

    Thank you - that solved a mystery on a client's site!

  3. #3
    Join Date
    Sep 2008
    Location
    DownUnder, overlooking South Pole.
    Posts
    976
    Plugin Contributions
    6

    Default Re: [Done v1.6.0] zen_has_product_attributes_downloads_status() returns incorrect res

    Quote Originally Posted by swguy View Post
    File: includes/functions/functions_lookups.php. This function is backwards!

    line 873 should be

    Code:
    if ($download_display->RecordCount() == 0) {
    not

    Code:
    if ($download_display->RecordCount() != 0) {
    I lose main content when change is applied. Is there something I am missing?

  4. #4
    Join Date
    Jul 2012
    Posts
    16,719
    Plugin Contributions
    17

    Default Re: [Done v1.6.0] zen_has_product_attributes_downloads_status() returns incorrect res

    Quote Originally Posted by dw08gm View Post
    I lose main content when change is applied. Is there something I am missing?
    Please elaborate. Posting tips answers is a good place to start, but really understanding whatcha' mean would help as well... Any error logs? http://www.zen-cart.com/content.php?124-blank-page
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

  5. #5
    Join Date
    Feb 2006
    Location
    Tampa Bay, Florida
    Posts
    9,627
    Plugin Contributions
    123

    Default Re: [Done v1.6.0] zen_has_product_attributes_downloads_status() returns incorrect res

    Quote Originally Posted by dw08gm View Post
    I lose main content when change is applied. Is there something I am missing?
    You've done something else wrong unless you have a modification which depends on the old (broken) behavior of this function.
    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.

  6. #6
    Join Date
    Sep 2008
    Location
    DownUnder, overlooking South Pole.
    Posts
    976
    Plugin Contributions
    6

    Default Re: [Done v1.6.0] zen_has_product_attributes_downloads_status() returns incorrect res

    Error Message reads

    Code:
    PHP Fatal error:  Can't use method return value in write context in ...\includes\functions\functions_lookups.php on line 875
    I accept the code is right and may have a modification which depends on the old (broken) behavior of this function, but so far have not been able to trace it.

    Thanks

  7. #7
    Join Date
    Sep 2008
    Location
    DownUnder, overlooking South Pole.
    Posts
    976
    Plugin Contributions
    6

    Default Re: [Done v1.6.0] zen_has_product_attributes_downloads_status() returns incorrect res

    Ma foi! I had single = instead of double ==.

  8. #8
    Join Date
    Jan 2004
    Posts
    66,364
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: [Done v1.6.0] zen_has_product_attributes_downloads_status() returns incorrect res

    It was fixed in v1.5.5 (and v1.6.0, albeit via multiple commits) this way: https://github.com/zencart/zencart/c...25402f18b050b6
    .

    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. Replies: 1
    Last Post: 29 Aug 2013, 04:46 AM
  2. Search function returns no result
    By sonander27 in forum Installing on a Windows Server
    Replies: 1
    Last Post: 3 Sep 2010, 11:08 AM
  3. [Done v2.0] Incorrect Language Validation
    By glenara in forum Bug Reports
    Replies: 7
    Last Post: 30 Jul 2010, 04:08 PM
  4. custom mySQL query returns incorrect results?
    By lat9 in forum General Questions
    Replies: 1
    Last Post: 1 Jun 2010, 03:20 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