From e88af6d9e04b5aefc8524ccb3f55c593e8ebec6c Mon Sep 17 00:00:00 2001 From: nickpons666 Date: Wed, 7 Jan 2026 22:24:05 -0600 Subject: [PATCH] Fix undefined array key warnings in productos module Added $info array initialization with default values for proveedorId and prodCatId to prevent 'Trying to access array offset on null' warnings in search-productos.tpl and enumProdCatSearch.tpl templates. --- modules/productos.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/modules/productos.php b/modules/productos.php index e97f427..16cf787 100755 --- a/modules/productos.php +++ b/modules/productos.php @@ -29,11 +29,17 @@ $categorias = $prodCat->EnumerateAll(); $proveedores = $proveedor->EnumerateAll(); - + $msg = $_SESSION['msgP']; $_SESSION['msgP'] = ''; - - $smarty->assign('msg', $msg); + + $info = array( + 'proveedorId' => '', + 'prodCatId' => '' + ); + + $smarty->assign('msg', $msg); + $smarty->assign('info', $info); $smarty->assign('categorias', $categorias); $smarty->assign('proveedores', $proveedores); $smarty->assign('productos', $productos);