Skip to content

Language: E_DEPRECATED on false→array dim write (#22828)#22857

Merged
PurHur merged 1 commit into
masterfrom
agent/issue-22828-false-append-deprecated
Jul 24, 2026
Merged

Language: E_DEPRECATED on false→array dim write (#22828)#22857
PurHur merged 1 commit into
masterfrom
agent/issue-22828-false-append-deprecated

Conversation

@PurHur

@PurHur PurHur commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • Emit Zend’s E_DEPRECATED: Automatic conversion of false to array is deprecated when FETCH_DIM_W / []= auto-vivifies a false container (zend_execute.c), then promote to [] as before (Language: $false[] = $v fatals — Zend promotes false to array like null (Zend/zend_execute.c) #22650).
  • Null/undefined stay silent; true/scalars still Error.
  • VM via ErrorReporter::internalDeprecated; JIT via DynamicPropertyDeprecationGuard::emitFalseToArray.
  • Compliance + repro guards; spine footnote sync 6503→6512 (inventory already 6512).

Closes #22828

php-src reference

  • Zend/zend_execute.c / Zend/zend_vm_def.h — assign-dim / fetch-dim-w false→array deprecation

Test plan

  • Issue repro (handler + stderr)
  • vendor/bin/phpunit --filter 'append_false_to_array_deprecated|append_false_promotes_array'
  • php script/bootstrap-inventory.php --check → OK 6512/6512

Verification

$ php bin/vm.php test/repro/issue_22828_false_append_deprecated.php
false_append_deprecated_ok
array
true_still_fatal_ok

$ php /tmp/fa.php 2>&1 | head -1
PHP Deprecated:  Automatic conversion of false to array is deprecated in /tmp/fa.php on line 4
$ php bin/vm.php /tmp/fa.php 2>&1 | head -1
PHP Deprecated:  Automatic conversion of false to array is deprecated in /tmp/fa.php on line 3

$ vendor/bin/phpunit --filter 'append_false_to_array_deprecated|append_false_promotes_array'
OK (4 tests, 4 assertions)

$ php script/bootstrap-inventory.php --check
OK 6512/6512

Trust probe (pre-claim)

Made with Cursor

Match Zend 8.1+ FETCH_DIM_W: promote false to [] after the automatic-conversion
deprecation; keep null silent and true as Error. Sync spine footnotes to 6512.

Co-authored-by: Cursor <cursoragent@cursor.com>
@PurHur
PurHur merged commit 40feb06 into master Jul 24, 2026
1 check failed
@PurHur
PurHur deleted the agent/issue-22828-false-append-deprecated branch July 24, 2026 10:51
PurHur added a commit that referenced this pull request Jul 24, 2026
…22866)

Post-#22847 merges (#22857/#22862/#22863/#22864/#22865) moved live
lowering_source_fingerprint to 9aee9361… while the committed stamp stayed
at 159f4081…, redding north-star5-verify-fast step 4f-m and
user_release_ready. Restamp only; honest verified-fresh remains on


#22642/#22717.

Co-authored-by: PurHur <PurHur@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
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.

Regression: $false[] = $v omits E_DEPRECATED Automatic conversion of false to array (re-#22650, Zend/zend_execute.c)

1 participant