[BUGFIX] Fix PHP warnings in PackageManager


Resolves: #54963
Releases: 6.2
Change-Id: I58b1f6109872d6eb8059fceb1bec1af7134e84e2
Reviewed-on: https://review.typo3.org/26789
Reviewed-by: Markus Klein
Tested-by: Markus Klein
Reviewed-by: Thomas Maroschik
Tested-by: Thomas Maroschik
Reviewed-by: Stefan Neufeind
Tested-by: Stefan Neufeind