X-Git-Url: https://git.llucax.com/mecon/meconlib.git/blobdiff_plain/7009e11967b2ad1cc2a88042d32800270b9ceecc..a7c8936abc0bf04b4410c4bc5ad0eaebe49b816e:/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; }