X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/7009e11967b2ad1cc2a88042d32800270b9ceecc..ab08e58537352a82e34dab0684ae5997ece1899c:/lib/MECON/Dependencia.php?ds=sidebyside 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; }