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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user