X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/7009e11967b2ad1cc2a88042d32800270b9ceecc..cf1f71752ba7c60a275cd3671e17523624448720:/lib/MECON/Dependencia.php diff --git a/lib/MECON/Dependencia.php b/lib/MECON/Dependencia.php index 1238652..6b01f1f 100644 --- a/lib/MECON/Dependencia.php +++ b/lib/MECON/Dependencia.php @@ -129,7 +129,7 @@ class MECON_Dependencia { if(DB::isError($result)) trigger_error($result->getMessage("query mal hecho"), E_USER_ERROR); while($row = $result->fetchRow()) - $agentes[] = new MECON_Agente($row[0]); + $agentes[$row[0]] = new MECON_Agente($this->_db, $row[0]); //Contratados $sql = "SELECT nrodoc FROM Contratados.Contratados @@ -138,7 +138,7 @@ class MECON_Dependencia { if(DB::isError($result)) trigger_error($result->getMessage("query mal hecho"), E_USER_ERROR); while($row = $result->fetchRow()) - $agentes[] = new MECON_Agente($row[0]); + $agentes[$row[0]] = new MECON_Agente($this->_db, $row[0]); return $agentes; }