3636
3737namespace Pickle \Package \PHP \Command \Release \Windows ;
3838
39+ use Closure ;
3940use Exception ;
4041use Pickle \Base \Archive ;
4142use Pickle \Base \Interfaces ;
42- use Pickle \Package ;
4343use Pickle \Package \PHP \Util \PackageJson ;
4444use Pickle \Package \Util \Header ;
4545
@@ -99,6 +99,7 @@ public function create(array $args = [])
9999 $ tmp_dir = $ build ->getTempDir ();
100100
101101 $ tmp = $ build ->getLog ('configure ' );
102+ $ m = null ;
102103 if (preg_match (',Build dir: \\s+([ \\: \\- \\.0-9a-zA-Z \\\\_]+), ' , $ tmp , $ m )) {
103104 if (preg_match (',^[a-z] \\: \\\\,i ' , $ m [1 ]) && is_dir ($ m [1 ])) {
104105 /* Parsed the fully qualified path */
@@ -109,7 +110,7 @@ public function create(array $args = [])
109110 }
110111 } else {
111112 $ build_dir = $ info ['arch ' ] == 'x86 ' ? $ tmp_dir : $ tmp_dir . DIRECTORY_SEPARATOR . 'x64 ' ;
112- $ build_dir .= DIRECTORY_SEPARATOR . ($ is_release ? 'Release ' : 'Debug ' );
113+ $ build_dir .= DIRECTORY_SEPARATOR . (( $ info [ ' is_release ' ] ?? true ) ? 'Release ' : 'Debug ' );
113114 $ build_dir .= ($ info ['thread_safe ' ] ? '_TS ' : '' );
114115 }
115116
@@ -191,6 +192,7 @@ public function getMultiExtensionNames()
191192 multiple DLLs be built. */
192193 $ config_w32_path = $ this ->build ->getPackage ()->getSourceDir () . DIRECTORY_SEPARATOR . 'config.w32 ' ;
193194 $ config_w32 = file_get_contents ($ config_w32_path );
195+ $ m = null ;
194196 if (preg_match_all ("/EXTENSION \\s* \\( \\s*('| \")([a-z0-9_]+)('| \") \\s*,/Sm " , $ config_w32 , $ m , PREG_SET_ORDER )) {
195197 foreach ($ m as $ r ) {
196198 if (!in_array ($ r [2 ], $ ext_names )) {
0 commit comments