@ -540,11 +540,12 @@ class CourseController extends ToolBaseController
'title' => 'course_homepage',
'session_id' => 0,
])
->getQuery();
->getQuery()
;
$results = $query->getResult();
return count($results) > 0 ? $results[0] : null;
return \count($results) > 0 ? $results[0] : null;
}
#[Route('/{id}/getToolIntro', name: 'chamilo_core_course_gettoolintro')]
@ -44,7 +44,8 @@ final class CLpItemRepository extends ServiceEntityRepository
->where('i.lp = :learningPathId')
->andWhere('i.itemType = :itemType')
->setParameter('learningPathId', $learningPathId)
->setParameter('itemType', $itemType);
->setParameter('itemType', $itemType)
$query = $qb->getQuery();