Skip to content

Conversation

@wozulong
Copy link

PHP 8.2+ throws "Array to string conversion" warning when proc_open receives environment variables containing non-scalar values.
Added filtering to ensure only scalar values are passed.

PHP 8.2+ throws "Array to string conversion" warning when proc_open
receives environment variables containing non-scalar values. Added
filtering to ensure only scalar values are passed.
@alecpl
Copy link
Contributor

alecpl commented Feb 20, 2025

Sounds like maybe https://bugs.php.net/bug.php?id=75712, which was fixed in PHP 8.2.17.

$this->_pipes,
null,
$env,
array_filter($env, 'is_scalar'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd probably do this once, when $env is being set. And add a comment describing why it is needed.

@alecpl
Copy link
Contributor

alecpl commented Apr 6, 2025

Fixed via 2826945

@alecpl alecpl closed this Apr 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants