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