[wp-trac] [WordPress Trac] #50054: Uncaught Error: [] operator not supported for strings >= PHP7.1.0

WordPress Trac noreply at wordpress.org
Sat May 2 07:43:25 UTC 2020


#50054: Uncaught Error: [] operator not supported for strings >= PHP7.1.0
-------------------------------+------------------------------
 Reporter:  9re9re             |       Owner:  (none)
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  Awaiting Review
Component:  Query              |     Version:  trunk
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+------------------------------
Changes (by SergeyBiryukov):

 * keywords:   => reporter-feedback
 * component:  General => Query


Comment:

 Hi there, welcome to WordPress Trac! Thanks for the report.

 I could not reproduce the issue on a clean install. There is some code in
 [source:tags/5.4.1/src/wp-includes/class-wp-query.php?marks=585-607#L585
 WP_Query::fill_query_var()] to make sure every parameter that should an
 array is properly initialized as such.

 Inspecting the value of `$q['tag_slug__in']` just before
 [source:tags/5.4.1/src/wp-includes/class-wp-query.php?marks=1253#L1236
 line 1253] shows that it is in fact an array.

 It looks like there is some code on your install that passes a string
 value to the `tag_slug__in` parameter.

 Does the issue still happen with all plugins disabled and a default theme
 (Twenty Twenty) activated?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50054#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list