[wp-trac] [WordPress Trac] #28030: cast $content as a string when calling do_shortcode()
WordPress Trac
noreply at wordpress.org
Fri Apr 25 17:33:33 UTC 2014
#28030: cast $content as a string when calling do_shortcode()
--------------------------+-----------------------------
Reporter: webstract | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Shortcodes | Version: 3.9
Severity: normal | Keywords:
Focuses: |
--------------------------+-----------------------------
There is a warning message in 3.9...
Warning: strpos() expects parameter 1 to be string, array given in
/public_html/wp-includes/shortcodes.php on line 193
To fix this we should cast $content as a string in `/wp-
includes/shortcodes.php` on line 193
Change:
`if ( false === strpos( $content, '[' ) ) {`
To:
`if ( false === strpos( (string) $content, '[' ) ) {`
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28030>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list