Results 1 to 5 of 5
  1. #1
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,137
    Plugin Contributions
    11

    Default PHP 7.2 Reports Error in media_manager.php

    PHP Warning: count(): Parameter must be an array or an object that implements Countable in /home/*******/public_html/includes/modules/media_manager.php on line 69
    Code:
    $zv_product_has_media = (count($za_media_manager) > 0);

    This is not reported until you reach PHP 7.2. I am surprised that it's still in 1.5.7a

    What's a suggestion for the fix?

    Literally asking for a friend.

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

    Default Re: PHP 7.2 Reports Error in media_manager.php

    1. It's a "Warning", not an "Error". Sure, some say "what's the difference?". Answer: severity. Errors abort execution. Warnings don't.

    2. Fix: https://github.com/zencart/zencart/c...2dda66b81c19c4
    .

    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
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,137
    Plugin Contributions
    11

    Default Re: PHP 7.2 Reports Error in media_manager.php



    My bad... That's what I get for trying to multitask and help a friend at the same time.

    THANX!

  4. #4
    Join Date
    Apr 2006
    Location
    Ohio
    Posts
    6,162
    Plugin Contributions
    0

    Default Re: PHP 7.2 Reports Error in media_manager.php

    Grrrrr ... @dbltoe !!
    Thanks Dr. Bytes !!! works great with no warnings when viewing a video from my website.

  5. #5
    Join Date
    Jul 2012
    Posts
    16,732
    Plugin Contributions
    17

    Default Re: PHP 7.2 Reports Error in media_manager.php

    An alternative (though not as complete because the variable wouldn't be predefined) would have been to change the trouble line to:
    Code:
    $zv_product_has_media = !empty($za_media_manager);
    ZC Installation/Maintenance Support <- Site
    Contribution for contributions welcome...

 

 

Similar Threads

  1. Replies: 4
    Last Post: 17 Jul 2015, 04:44 AM
  2. PHP editor reports syntax error
    By JuxiZoza in forum Bug Reports
    Replies: 3
    Last Post: 19 Oct 2011, 09:51 PM
  3. Replies: 3
    Last Post: 13 Mar 2009, 05:20 PM
  4. Replies: 5
    Last Post: 16 Jan 2009, 10:05 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