(the tec spec and usage info were imported via phpMyAdmin)
I have included this coding in update_product.php betwwen products_description and products_url:
Code: Select all
'products_description' => Text::prepare($_POST['products_description'][$l['id']]),
'products_usage' => Text::prepare($_POST['products_usage'][$l['id']]),
'products_tec_spec' => Text::prepare($_POST['products_tec_spec'][$l['id']]),
'products_faq' => Text::prepare($_POST['products_faq'][$l['id']]),
'products_parts' => Text::prepare($_POST['products_parts'][$l['id']]),
'products_url' => Text::prepare($_POST['products_url'][$l['id']]),
Code: Select all
[11-Feb-2024 13:41:27 UTC] PHP Notice: Undefined index: products_usage in /home/**/public_html/**/admin/includes/actions/catalog/update_product.php on line 45
[11-Feb-2024 13:41:27 UTC] PHP Fatal error: Uncaught TypeError: Argument 1 passed to Text::prepare() must be of the type string, null given, called in /home/**/public_html/**/admin/includes/actions/catalog/update_product.php on line 45 and defined in /home/**/public_html/**/includes/system/versioned/1.0.8.2/text.php:63
Stack trace:
#0 /home/**/public_html/**/admin/includes/actions/catalog/update_product.php(45): Text::prepare(NULL)
#1 /home/**/public_html/**/admin/includes/segments/process_action.php(19): require('/home/**/...')
#2 /home/**/public_html/**/admin/catalog.php(32): require('/home/**/...')
#3 {main}
thrown in /home/**/public_html/**/includes/system/versioned/1.0.8.2/text.php on line 63
[11-Feb-2024 13:42:17 UTC] PHP Notice: Undefined index: products_usage in /home/**/public_html/**/admin/includes/actions/catalog/update_product.php on line 45
[11-Feb-2024 13:42:17 UTC] PHP Fatal error: Uncaught TypeError: Argument 1 passed to Text::prepare() must be of the type string, null given, called in /home/**/public_html/**/admin/includes/actions/catalog/update_product.php on line 45 and defined in /home/**/public_html/**/includes/system/versioned/1.0.8.2/text.php:63
Stack trace:
#0 /home/**/public_html/**/admin/includes/actions/catalog/update_product.php(45): Text::prepare(NULL)
#1 /home/**/public_html/**/admin/includes/segments/process_action.php(19): require('/home/mudlarki/...')
#2 /home/**/public_html/**/admin/catalog.php(32): require('/home/mudlarki/...')
#3 {main}
thrown in /home/**/public_html/**/includes/system/versioned/1.0.8.2/text.php on line 63
I'm trying to work out where I've gone wrong and why I'm getting Undefined index
Can anyone help?