Commit 70da6223 authored by Stephane Bouvry's avatar Stephane Bouvry
Browse files

Fix : Key "project_id" introuvable sur la recherche des...

Fix : Key "project_id" introuvable sur la recherche des personnes/organisations (affiche un warning en DEV)
parent c434be34
Loading
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -201,12 +201,14 @@ abstract class ElasticSearchEngine
        if ($response && $response['hits'] && $response['hits']['total'] > 0) {
            foreach ($response['hits']['hits'] as $hit) {
                $ids[] = intval($hit["_id"]);
                if( array_key_exists('project_ids', $hit['_source']) ) {
                    $idProject = intval($hit['_source']["project_id"]);
                    if( $withIdsProjects && !in_array($idProject, $idsProjects) ){
                        $idsProjects[] = $idProject;
                    }
                }
            }
        }

        if( $withIdsProjects ){
            return [