Skip to content

Conversation

@JanTvrdik
Copy link
Contributor

Summary

  • Fix PHP 8.5 deprecation warning when using -o console without a filename
  • PHP 8.5 deprecated using null as an array offset; when no filename is specified, $file was null and used as key in $outputFiles[$file]
  • Changed default from null to empty string '' and updated corresponding checks

Test plan

  • Verified all 88 tests pass with src/tester tests -s -C
  • Confirmed output handlers work correctly (they use $file ?: 'php://output' which handles empty string the same as null)

PHP 8.5 deprecated using null as an array offset. When running
`-o console` without a filename, $file was null and used as array
key in $outputFiles[$file], triggering E_DEPRECATED which the
strict error handler converted to a fatal error.

Changed the default from null to empty string '' and updated the
corresponding null checks to check for empty string instead.
@JanTvrdik
Copy link
Contributor Author

Unlucky, https://httpbin.org/ is down

@dg
Copy link
Member

dg commented Nov 25, 2025

thanks

@dg dg merged commit fc091fc into nette:master Nov 25, 2025
3 of 21 checks passed
@JanTvrdik JanTvrdik deleted the fix-php85-null-array-offset branch November 25, 2025 14:21
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