|
@@ -138,6 +138,10 @@ class IndexController extends AbstractController
|
|
|
}
|
|
|
} elseif ($fromList === 'common' && $toList === 'user') {
|
|
|
$last = end($userListFilms);
|
|
|
+ if (!$last) {
|
|
|
+ $newUserListFilm->setPosition(0);
|
|
|
+ return;
|
|
|
+ }
|
|
|
$positionLast = $last->getPosition();
|
|
|
$newUserListFilm->setPosition($positionLast + 1);
|
|
|
|