File tree 1 file changed +9
-7
lines changed
1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -29,10 +29,10 @@ final class ProcessContext extends AbstractContext
29
29
];
30
30
31
31
private const XDEBUG_OPTIONS = [
32
- "xdebug.mode " => " debug " ,
33
- "xdebug.start_with_request " => " default " ,
34
- "xdebug.client_port " => " 9003 " ,
35
- "xdebug.client_host " => " localhost " ,
32
+ "xdebug.mode " ,
33
+ "xdebug.start_with_request " ,
34
+ "xdebug.client_port " ,
35
+ "xdebug.client_host " ,
36
36
];
37
37
38
38
/** @var non-empty-string|null External version of SCRIPT_PATH if inside a PHAR. */
@@ -222,10 +222,12 @@ private static function buildOptions(): array
222
222
223
223
// This copies any ini values set via the command line (e.g., a debug run in PhpStorm)
224
224
// to the child process, instead of relying only on those set in an ini file.
225
- if (\ini_get ("xdebug.mode " ) !== false ) {
226
- foreach (self ::XDEBUG_OPTIONS as $ option => $ defaultValue ) {
225
+ if (\extension_loaded ( ' xdebug ' ) && \ ini_get ("xdebug.mode " ) !== false ) {
226
+ foreach (self ::XDEBUG_OPTIONS as $ option ) {
227
227
$ iniValue = \ini_get ($ option );
228
- $ options [$ option ] = $ iniValue === false ? $ defaultValue : $ iniValue ;
228
+ if ($ iniValue !== false ) {
229
+ $ options [$ option ] = $ iniValue ;
230
+ }
229
231
}
230
232
}
231
233
You can’t perform that action at this time.
0 commit comments