Believed bug: includes/classes/upload.php line 84
Getting the following log:
Code:
[10-Aug-2018 16:37:47 UTC] Request URI: /shop/admin/categories.php?action=update_category&cPath=1, IP address: 24.176.185.195
#1 trim() called at [/home/sparkswhsle/public_html/shop/admin/includes/functions/general.php:441]
#2 zen_not_null() called at [/home/sparkswhsle/public_html/shop/includes/classes/upload.php:87]
#3 upload->parse() called at [/home/sparkswhsle/public_html/shop/admin/categories.php:233]
[10-Aug-2018 16:37:47 UTC] PHP Warning: trim() expects parameter 1 to be string, object given in /home/sparkswhsle/public_html/shop/admin/includes/functions/general.php on line 441
Possible root cause: should includes/classes/upload.php line 84 be changed from:
Code:
'tmp_name' => (isset($GLOBALS[$this->file]) ? $GLOBALS[$this->file] : ''),
to:
Code:
'tmp_name' => (isset($GLOBALS[$this->file . '_tmp_name']) ? $GLOBALS[$this->file . '_tmp_name'] : ''),
Re: Believed bug: includes/classes/upload.php line 84
can you provide the steps necessary to replicate the error?
best.
Re: Believed bug: includes/classes/upload.php line 84
I cannot. I am just seeing these logs after the fact.
Re: Believed bug: includes/classes/upload.php line 84
You know, of course, that without replication of the error you're throwing spit-balls on the ceiling to see what sticks in any "solution".
Re: Believed bug: includes/classes/upload.php line 84
Quote:
Originally Posted by
lat9
You know, of course, that without replication of the error you're throwing spit-balls on the ceiling to see what sticks in any "solution".
my thoughts exactly.... although perhaps i would have used a different analogy...
Re: Believed bug: includes/classes/upload.php line 84
I'm kind of hoping someone else who has had this problem will chime in and describe how it happens. I haven't yet had time to dup it; I just saw it yesterday. Obviously I am going to try.
Re: Believed bug: includes/classes/upload.php line 84
Was trying to add images to attributes in an upgrade from 1.5.4. First, former x spurt had turned off images for attributes. Of course, Attributes Image Swatch etc. would not show up. Once I made the suggested change, all image data showed in the Attributes Controller.
HTH
Re: Believed bug: includes/classes/upload.php line 84
Quote:
Originally Posted by
swguy
I'm kind of hoping someone else who has had this problem will chime in and describe how it happens. I haven't yet had time to dup it; I just saw it yesterday. Obviously I am going to try.
This bug happens every time I try and add an attribute using the attributes controller on my site.
Code:
Request URI: /ADMIN_DIR/attributes_controller.php?action=add_product_attributes&attribute_page=1&products_filter=19771
#1 trim() called at [/home/HOME_DIR/ZEN_DIR/ADMIN_DIR/includes/functions/general.php:441]
#2 zen_not_null() called at [/home/HOME_DIR/ZEN_DIR/includes/classes/upload.php:87]
#3 upload->parse() called at [/home/HOME_DIR/ZEN_DIR/ADMIN_DIR/attributes_controller.php:308]
[09-Oct-2018 11:08:16 America/Chicago] PHP Warning: trim() expects parameter 1 to be string, object given in /home/HOME_DIR/ZEN_DIR/ADMIN_DIR/includes/functions/general.php on line 441
The above fix seems to work fine.
This doesn't happen in a stock install of zen cart, seems to have something to do with enabling attribute images somewhere.