* @param Playlist $playlist
* @param null $includeAll
*
* @return mixed
*/
public function getVideosPlaylist(Playlist $playlist, $includeAll = null)
{
$req = $this->createQueryBuilder('playlist')
->select('playlistVideo')
->join(PlaylistVideo::class, 'playlistVideo', Join::WITH, "playlistVideo.playlist = playlist.id")
->orderBy('playlistVideo.order','ASC')
} else {
$displayList = true;
}
$playlist = $manager->getRepository(Playlist::class)->find($id);
$playlistVideos = $manager->getRepository(Playlist::class)->getVideosPlaylist($playlist);
if ($this->getUser() && $this->getUser() === $playlist->getUser()) {
// Ok on est full droit on peut continuer
} else {
if ($playlist->getStatus() == 0 || $playlist->getStatus() == 1 || ($this->getUser()) && $this->getUser()->hasRole('ROLE_ADMIN')) {
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = $controller(...$arguments);
// view
if (!$response instanceof Response) {
$event = new ViewEvent($this, $request, $type, $response);
$this->dispatcher->dispatch($event, KernelEvents::VIEW);
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
{
$request->headers->set('X-Php-Ob-Level', ob_get_level());
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
No log messages
TypeError |
---|
TypeError: Argument 1 passed to App\Repository\PlaylistRepository::getVideosPlaylist() must be an instance of App\Entity\Playlist, null given, called in /var/www/dev/website-kinomap/releases/20240213080835/src/Controller/Videos/PlaylistsController.php on line 375 at src/Repository/PlaylistRepository.php:31 at App\Repository\PlaylistRepository->getVideosPlaylist(null) (src/Controller/Videos/PlaylistsController.php:375) at App\Controller\Videos\PlaylistsController->profile('15087', object(Request)) (vendor/symfony/http-kernel/HttpKernel.php:151) at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1) (vendor/symfony/http-kernel/HttpKernel.php:68) at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true) (vendor/symfony/http-kernel/Kernel.php:198) at Symfony\Component\HttpKernel\Kernel->handle(object(Request)) (public/index.php:27) |