File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -1452,7 +1452,9 @@ private function _openSubprocess()
14521452 $ rb = (version_compare (PHP_VERSION , '5.2.6 ' ) < 0 ) ? 'r ' : 'rb ' ;
14531453 $ wb = (version_compare (PHP_VERSION , '5.2.6 ' ) < 0 ) ? 'w ' : 'wb ' ;
14541454
1455- $ env = $ _ENV ;
1455+ // Get environment variables. Exclude non-scalar values to prevent from a warning in proc_open().
1456+ // Possibly related to https://bugs.php.net/bug.php?id=75712, which was fixed in PHP 8.2.17.
1457+ $ env = array_filter ($ _ENV , 'is_scalar ' );
14561458
14571459 // Newer versions of GnuPG return localized results. Crypt_GPG only
14581460 // works with English, so set the locale to 'C' for the subprocess.
@@ -1546,9 +1548,11 @@ private function _openSubprocess()
15461548 }
15471549 }
15481550
1549- $ this ->_debug ('GPG-AGENT-INFO: ' . $ this ->_agentInfo );
1551+ if (is_string ($ this ->_agentInfo )) {
1552+ $ this ->_debug ('GPG-AGENT-INFO: ' . $ this ->_agentInfo );
15501553
1551- $ env ['GPG_AGENT_INFO ' ] = $ this ->_agentInfo ;
1554+ $ env ['GPG_AGENT_INFO ' ] = $ this ->_agentInfo ;
1555+ }
15521556
15531557 // gpg-agent daemon is started, we can close the launching process
15541558 $ this ->_closeAgentLaunchProcess ();
You can’t perform that action at this time.
0 commit comments