Skip to content

Stdlib: socket_write(null) soft-null Deprecated+Broken pipe (#30320) - #30333

Merged
PurHur merged 1 commit into
masterfrom
fix/30320-socket-write-soft-null
Aug 11, 2026
Merged

Stdlib: socket_write(null) soft-null Deprecated+Broken pipe (#30320)#30333
PurHur merged 1 commit into
masterfrom
fix/30320-socket-write-soft-null

Conversation

@PurHur

@PurHur PurHur commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • Soft-null socket_write($s, null) matches Zend Deprecated + unable to write to socket [32]: Broken pipe + false (Closes #30320).
  • SocketsLibcThinAbi::send no longer short-circuits length 0 (unbound stream → EPIPE).
  • VmSockets::write emits the Zend-shaped warning.

Test plan

  • issue repro Zend+VM
  • vendor/bin/phpunit --filter SocketWriteSoftNullVMTest OK
  • sendto soft-null still OK
  • Not covered: JIT path for socket_write warnings

Made with Cursor

Soft-null $data outside strict_types; length-0 write hits libc so unbound
SOCK_STREAM returns EPIPE with Zend-shaped unable-to-write warning.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 14cf053 into master Aug 11, 2026
1 check failed
@PurHur
PurHur deleted the fix/30320-socket-write-soft-null branch August 11, 2026 18:14
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.

1 participant