[wp-trac] [WordPress Trac] #55104: is_main_query() fatal error on null

WordPress Trac noreply at wordpress.org
Mon Feb 7 15:03:15 UTC 2022

#55104: is_main_query() fatal error on null
 Reporter:  nhadsall      |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Query         |    Version:  trunk
 Severity:  major         |   Keywords:
  Focuses:                |
 In some cases, {{{get_the_title( $posd_id )}}} and then plugins hook into
 {{{the_title}}} calling {{{is_main_query()}}}. In these cases,
 {{{$wp_query}}} is null. This causes a fatal error. It would be safer to
 check if {{{$wp_query}}} is set before.

Ticket URL: <https://core.trac.wordpress.org/ticket/55104>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list