Results 1 to 8 of 8
  1. #1
    Join Date
    Jul 2007
    Posts
    342
    Plugin Contributions
    7

    Default PHP warning Attributes controller

    Has anyone had this Php warning from admin/attributes_controller.php? Running PHP 7.3 Zencart 1.56c
    sizeof() called at [/var/www/vhosts/jawel.co.uk/httpdocs/admin/attributes_controller.php:283]
    --> PHP Warning: sizeof(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/domain/httpdocs/admin/attributes_controller.php on line 283.


    Appreciate any help thanks

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

    Default Re: PHP warning Attributes controller

    How did you get this to happen? I can see what's happening ('add_product_attributes' is being called with no attributes) but I can't figure out how to reproduce it.)
    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.

  3. #3
    Join Date
    Jul 2007
    Posts
    342
    Plugin Contributions
    7

    Default Re: PHP warning Attributes controller

    Quote Originally Posted by swguy View Post
    How did you get this to happen? I can see what's happening ('add_product_attributes' is being called with no attributes) but I can't figure out how to reproduce it.)
    Full log file:
    [21-Feb-2020 08:42:06 UTC] Request URI: /admin/attributes_controller.php?action=add_product_attributes&attribute_page=1&product s_filter=3444, IP address:
    #1 sizeof() called at [/var/www/vhosts/domain/httpdocs/admin/attributes_controller.php:283]
    --> PHP Warning: sizeof(): Parameter must be an array or an object that implements Countable in /var/www/vhosts/domain/httpdocs/admin/attributes_controller.php on line 283.

    Hope this helps
    Thanks

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

    Default Re: PHP warning Attributes controller

    No - I want to know the sequence of actions you took to produce this log.
    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.

  5. #5
    Join Date
    Jul 2007
    Posts
    342
    Plugin Contributions
    7

    Default Re: PHP warning Attributes controller

    Quote Originally Posted by swguy View Post
    How did you get this to happen? I can see what's happening ('add_product_attributes' is being called with no attributes) but I can't figure out how to reproduce it.)
    Is it possible that an attribute was attempted to be added in the wrong order and this caused the Warning?

  6. #6
    Join Date
    Jul 2007
    Posts
    342
    Plugin Contributions
    7

    Default Re: PHP warning Attributes controller

    Quote Originally Posted by swguy View Post
    No - I want to know the sequence of actions you took to produce this log.
    Sorry I just came across the log on the server and was looking to fix it. So I don't know what was being attempted at the time or sequence.
    Thanks again

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

    Default Re: PHP warning Attributes controller

    OK. If you can get to the point where you could repro this on demand, just let me know how to do it (e.g. "To to Admin > Tools > Attributes Controller, select this product, do this, do that, etc press Save, and the log appears."

    I tried to do things I thought would cause this but couldn't me the log happen.
    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.

  8. #8
    Join Date
    Jul 2007
    Posts
    342
    Plugin Contributions
    7

    Default Re: PHP warning Attributes controller

    Quote Originally Posted by swguy View Post
    OK. If you can get to the point where you could repro this on demand, just let me know how to do it (e.g. "To to Admin > Tools > Attributes Controller, select this product, do this, do that, etc press Save, and the log appears."

    I tried to do things I thought would cause this but couldn't me the log happen.
    Thanks for the help and time you spent on this. I suspect they tried to do something in the wrong order, as they add products and attributes fairly frequently. But if I find any further info I post it here. Again thank you

 

 

Similar Threads

  1. Replies: 1
    Last Post: 6 Mar 2019, 03:32 PM
  2. v155 Product Attributes insert throws PHP WARNING v1.5.5f
    By fiddlestix in forum Upgrading to 1.5.x
    Replies: 3
    Last Post: 13 Aug 2018, 06:20 PM
  3. Attributes Controller / Attributes Qty Price Discount
    By rdcast in forum Setting Up Categories, Products, Attributes
    Replies: 19
    Last Post: 6 Aug 2011, 02:53 AM
  4. How to use Attributes Controller to arrange two attributes!!!
    By signagen in forum Setting Up Categories, Products, Attributes
    Replies: 7
    Last Post: 27 Jun 2008, 02:25 AM
  5. Improved Attributes Controller/Ajax Attributes Controller
    By Jan51 in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 26 Jul 2006, 01: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