[2.2][Process] Fix Array to string conversion exception

Fix issue where env actually contains values that are arrays

https://github.com/symfony/symfony/issues/7353