
Originally Posted by
wsworx
I also found that when I change the attribute Option Type like I did I am getting 2 new debug log files regarding the includes/functions/functions_files.php
Code:
[19-Feb-2025 10:34:57 America/Boise] Request URI: //admin/index.php?cmd=orders&page=1&oID=4&action=edit, IP address: , Language id 1
#0 //public_html//includes/functions/functions_files.php(384): zen_debug_error_handler()
#1 //public_html//admin/orders.php(885): zen_get_uploaded_file()
#2 //public_html//admin/index.php(16): require('//..')
--> PHP Warning: Undefined array key 1 in /public_html//includes/functions/functions_files.php on line 384.
Code:
[19-Feb-2025 10:57:34 America/Boise] Request URI: //admin/index.php?cmd=orders&page=1&oID=4&action=edit, IP address: , Language id 1
#0 [internal function]: zen_debug_error_handler()
#1 //public_html//includes/functions/functions_files.php(385): explode()
#2 //public_html//admin/orders.php(885): zen_get_uploaded_file()
#3 //public_html//admin/index.php(16): require('//...')
--> PHP Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in //public_html//includes/functions/functions_files.php on line 385.
Those two errors are because the filename is null/blank, which is correct because no filename was stored on the order, because it wasn't a File attribute when the order was placed.
I suppose if you're going to be in the habit of changing TEXT attributes to FILE attributes after-the-fact, then you could patch the lookup by changing line 884 of orders.php:
PHP Code:
if (zen_is_option_file($order->products[$i]['attributes'][$j]['option_id'])) {
to
PHP Code:
if (zen_is_option_file($order->products[$i]['attributes'][$j]['option_id']) && !empty($order->products[$i]['attributes'][$j]['value'])) {
Bookmarks