[wp-trac] [WordPress Trac] #59206: PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on string in Stack trace:\n#0 [internal function]: img_caption_shortcode()
WordPress Trac
noreply at wordpress.org
Fri Aug 25 17:17:43 UTC 2023
#59206: PHP Fatal error: Uncaught TypeError: Cannot access offset of type string on
string in Stack trace:\n#0 [internal function]: img_caption_shortcode()
--------------------------+--------------------------------
Reporter: maltfield | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 6.3
Severity: normal | Resolution:
Keywords: | Focuses: php-compatibility
--------------------------+--------------------------------
Comment (by maltfield):
Update: it appears that the error goes away if the `width` option is
provided.
Per the documentation (linked-above), the `width` option *is* required. So
when using the `[caption]` shortcode properly, this doesn't result in an
error.
But, in any case, this is still a bug as misuse of a shotcode shouldn't
result in a PHP Fatal error..
--
Ticket URL: <https://core.trac.wordpress.org/ticket/59206#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list