Inventory Updater v1.2.1
PHP v7.2.10
Upgrading to ZCv1.57, I get these myDEBUG logs notices when viewing the Inventory Updater page - I know the notices are not critical but if I don't address these undefined index notices (and many others unrelated to Inventory Updater, across the site) the number of log files will become unmanageable.
Code:
[08-Jul-2020 10:59:08 Europe/London] PHP Notice: Undefined index: sort in D:\wamp64\www\mydomain.co.uk\myadmin\inventory.php on line 73
[08-Jul-2020 10:59:08 Europe/London] PHP Stack trace:
[08-Jul-2020 10:59:08 Europe/London] PHP 1. {main}() D:\wamp64\www\mydomain.co.uk\myadmin\index.php:0
[08-Jul-2020 10:59:08 Europe/London] PHP 2. require() D:\wamp64\www\mydomain.co.uk\myadmin\index.php:11
[08-Jul-2020 10:59:08 Europe/London] PHP Notice: Undefined index: sort in D:\wamp64\www\mydomain.co.uk\myadmin\inventory.php on line 285
[08-Jul-2020 10:59:08 Europe/London] PHP Stack trace:
[08-Jul-2020 10:59:08 Europe/London] PHP 1. {main}() D:\wamp64\www\mydomain.co.uk\myadmin\index.php:0
[08-Jul-2020 10:59:08 Europe/London] PHP 2. require() D:\wamp64\www\mydomain.co.uk\myadmin\index.php:11
... followed by a line 285 entry for every product listed.
inventory.php line 71-76
Code:
$sort = (isset($_GET['sort']) ? $_GET['sort'] : '0');
$order_by = " ";
switch ($_GET['sort']) {
case (0):
$order_by = " ORDER BY p.products_sort_order, pd.products_name";
break;
inventory.php line 284-286
Code:
<a href="<?= zen_href_link(FILENAME_INVENTORY,
'action=tg_stat' . '&pid=' . $prod_list->fields['products_id'] . $cid_params . '&sort=' . $_GET['sort'] . '&active=' . $_GET['active'],
'SSL'); ?>">
'PHP Notice: Undefined index:' seems to be a bit of a theme with my upgrade to ZCv1.57 - seems to be mainly caused by old mods and my crude hacking of php files, still trying to get my head around the whys and wherefores.
Bookmarks