Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2010
    Location
    Northwe't USA
    Posts
    7
    Plugin Contributions
    0

    Default Product Attributes insert throws PHP WARNING v1.5.5f

    PHP Version: 7.0.30 Database: MySQL 5.5.5-10.1.31-MariaDB-cll-lve
    Chrome or Firefox browser same result.

    Testing zc upgrade from v1.5.4 to v1.5.5f.
    This occurs in a test version (my data and multiple add-ons) AND ALSO in the vanilla zc155f fresh install (no changes).

    Adding attributes to a product gives the following warning in v155f (but not v154).

    Code:
    [24-May-2018 18:38:03 America/Los_Angeles] Request URI: /ADMIN/attributes_controller.php?action=add_product_attributes&attribute_page=1&products_filter=61, IP address: 73.67.247.124
    #1 trim() called at [/home/xxx/public_html/ADMIN/includes/functions/general.php:441]
    #2 zen_not_null() called at [/home/xxx/public_html/includes/classes/upload.php:87]
    #3 upload->parse() called at [/home/xxx/public_html/ADMIN/attributes_controller.php:308]
    
    [24-May-2018 18:38:03 America/Los_Angeles] PHP Warning: trim() expects parameter 1 to be string, object given in /home/xxx/public_html/V155f/v2/ADMIN/includes/functions/general.php on line 441
    We don't use attribute images in the store, so have had the Admin > Configuration > Attribute Settings > Enable Attribute Images > false

    The warning does not occur if I set Enable Attributes Images to true. Even tho I don't add an image for the attribute.

    Any ideas about a code change to prevent this from happening? I would rather not leave the Attribute Images enabled...

    Thanks

  2. #2
    Join Date
    Jan 2004
    Location
    N of San Antonio TX
    Posts
    9,145
    Plugin Contributions
    11

    Default Re: Product Attributes insert throws PHP WARNING v1.5.5f

    While it might be a problem with the newer version of PHP and it's a good idea to let the community know, I wouldn't go so far as to try and change code.

    If you don't actually attach an image to an attribute, it doesn't matter what the switch is set to in the admin. You won't see an image because there isn't one to use.

    I appreciate the input, I just caution you on the "unneeded font" syndrome. Had a friend that was near paranoid on things being on his computer that he didn't want. He would constantly tell me that he found another unwanted font and "killed that sucker." Yep, months later, he's got several programs that aren't working because they can't find a needed system font.

    Unless you can prove that leaving it on will create a problem, I'd leave it on. Someone here on the forum will find the PHP problem if it's not already addressed in the 1.5.6 github. IMHO it should be on with no option to turn off. Just a matter of the code saying, "if there's a picture for this attribute, use it."

  3. #3
    Join Date
    Jan 2010
    Location
    Northwe't USA
    Posts
    7
    Plugin Contributions
    0

    Default Re: Product Attributes insert throws PHP WARNING v1.5.5f

    Okie doke, dbltoe. Thanks for looking into this. You're probably right in that this issue may be PHP-related. The current live store is 5.6.36 and my test site is 7.

    My reasoning for the switch to work is completely selfish ... I want to retire (again) and after this upgrade am hoping to turn more of the website management over to the store owner, and don't want him to be tweaking things that will cause problems. I'll just warn him in the documentation I'm preparing ... not to change this particular value.

    Thanks so much for taking the time to respond!

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

    Default Re: Product Attributes insert throws PHP WARNING v1.5.5f

    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.

 

 

Similar Threads

  1. v154 Insert attributes directly from product's page
    By alex369 in forum Setting Up Categories, Products, Attributes
    Replies: 4
    Last Post: 8 Sep 2015, 02:08 PM
  2. Attributes will not insert into a product
    By dawndmd in forum General Questions
    Replies: 5
    Last Post: 14 Dec 2012, 11:57 PM
  3. Replies: 8
    Last Post: 19 Sep 2012, 03:37 AM
  4. attributes problem .I have lot color for my product .If I Insert 10 color overstep
    By MuDanTingWai in forum Setting Up Categories, Products, Attributes
    Replies: 12
    Last Post: 24 Dec 2010, 10:06 PM
  5. phpbb throws php errors
    By horstt in forum Installing on a Linux/Unix Server
    Replies: 10
    Last Post: 14 Apr 2007, 07:07 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