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.
This commit is contained in:
2026-01-07 22:24:05 -06:00
parent 57d1d41e1f
commit e88af6d9e0

View File

@@ -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);