Skip to content

Placeholder for a deleted record; throw instead of E_USER_ERROR (#5, #6) [4.x] - #18

Merged
micschk merged 3 commits into
v4from
fix/issues-5-6-v4
Nov 3, 2026
Merged

micschk merged 3 commits into
v4from
fix/issues-5-6-v4

Conversation

@micschk

@micschk micschk commented Nov 3, 2026

Copy link
Copy Markdown
Member

Release 4.0.19. Backport of the two PHP fixes in #17 (cherry-picked, unchanged).

The 4.x branch has no tests or CI of its own. main's PHPUnit suite (from #17, incl. the two new tests) was run locally against this branch's code on a Silverstripe 5 host (PHP 8.3): on b6f7e51 the two new tests fail (hasMethod() on null; the E_USER_ERROR); after the fixes both pass. The same 8 other tests fail before and after: they cover 5.x-only behaviour (is_tinymce_config(), editor.css, the 5.2.0 shortcode_close_parent rework). Not tested: Silverstripe 4.

Refs #5, #6 (closed by #17)

Pair-programmed with my buddy Claude

#6)

shortcodePlaceHolder() took the byID() result as is, so an ObjectID whose record no longer
exists ended in a 500 (hasMethod() on null). The class singleton now answers, as it already
did for a request without an ObjectID.

Pair-programmed with my buddy Claude
)

PHP 8.4 deprecates passing E_USER_ERROR to trigger_error(). The message is unchanged. Behaviour
change for a misconfigured site: a catchable LogicException instead of a fatal error.

Pair-programmed with my buddy Claude
Pair-programmed with my buddy Claude
@micschk
micschk merged commit 03fc6ae into v4 Nov 3, 2026
@micschk
micschk deleted the fix/issues-5-6-v4 branch November 3, 2026 16:01
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