[wp-trac] [WordPress Trac] #57491: Php 8.2.0 - error if the Wp Query does not have any post

WordPress Trac noreply at wordpress.org
Tue May 16 07:27:35 UTC 2023


#57491: Php 8.2.0 -  error if the Wp Query does not have any post
--------------------------------+------------------------------
 Reporter:  davidki             |       Owner:  (none)
     Type:  defect (bug)        |      Status:  closed
 Priority:  normal              |   Milestone:  Awaiting Review
Component:  Query               |     Version:  6.1.1
 Severity:  major               |  Resolution:  invalid
 Keywords:  php8 needs-testing  |     Focuses:
--------------------------------+------------------------------
Changes (by davidki):

 * status:  new => closed
 * resolution:   => invalid


Comment:

 I Resolved it.

 I had custom query nested in main query (loop) of the page template.

 I deleted main query of the page template and I left only the custom
 query.

 PHP warning disappeared.


 Thanks for your effort.

 david

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


More information about the wp-trac mailing list