Skip to content

Conversation

@phuclh
Copy link

@phuclh phuclh commented Nov 19, 2025

What:

  • Bug Fix
  • New Feature

Description:

Fixes operator precedence bug in bin/worker.php line 89 that causes "Undefined array key
'testdox-columns'" warning when running tests with --parallel flag.

The type cast (int) has higher precedence than the null coalescing operator ??, causing PHP
to access the array key before checking if it exists.

Changed from:

(int) $getopt['testdox-columns'] ?? null,

To:
isset($getopt['testdox-columns']) ? (int) $getopt['testdox-columns'] : null,

This ensures the array key is only accessed after verifying it exists.

Related:

#1573

@Se7en-RU
Copy link
Contributor

Se7en-RU commented Nov 21, 2025

It's already fixed in latest release
https://github.com/pestphp/pest/releases/tag/v4.1.4

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