Repository navigation
Fix @ suppress slot stealing hoisted null call args (#13248) - #16150
Merged
Merged
Conversation
Post-ErrorSuppressBlock lowering was wiring the first dead inline temp on any following call to the silenced expression return slot, so patterns like `@mkdir($dir); copy(..., stream_context_create([]))` passed mkdir's bool into stream_context_create(). Only bind when the outer call actually consumes the suppressed inner result (#10336, #15916). Co-authored-by: Cursor <cursoragent@cursor.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
#15916post-ErrorSuppressBlockslot inheritance treated the first dead inline call-arg temp on any following call as the silenced inner result. After@mkdir($dir), hoistednull/[]operands forstream_context_create()were wired to mkdir'sboolreturn slot.FUNCCALL_EXEC_RETURNslot when the outer call actually consumes the suppressed inner expression (callInErrorSuppressEndBlockUsesInnerResultAsArg). Preservesvar_export(@get_cfg_var(...), true)(Regression: get_cfg_var('display_errors') — returns true not empty string (ext/standard/ini.c) #15916) and inline@statforwarding (Stdlib: stat()/lstat() on missing path — returns NULL not false (ext/standard/stat.c) #10336).php-src reference
ext/standard/streams.c—stream_context_create()acceptsnull/empty arrayext/standard/file.c—copy()optional$contextthird argumentVerification
Output (2026-07-04):
Relates to closed #13248 (copy
$contextarg) and #15916 (@ suppress forwarding).Made with Cursor