[wp-trac] [WordPress Trac] #59014: PHP Fatal error in post-template.php

WordPress Trac noreply at wordpress.org
Tue Nov 11 16:47:35 UTC 2025


#59014: PHP Fatal error in post-template.php
-------------------------------+-------------------------
 Reporter:  volqld             |       Owner:  (none)
     Type:  defect (bug)       |      Status:  closed
 Priority:  normal             |   Milestone:
Component:  Posts, Post Types  |     Version:  6.3
 Severity:  minor              |  Resolution:  worksforme
 Keywords:  needs-patch        |     Focuses:  template
-------------------------------+-------------------------

Comment (by nuagelab):

 The cause of this like likely that you are using the variable {{{$page}}}
 somewhere in the template of the page causing the error.

 This is simple to reproduce. Just take a WordPress template (ex.
 {{{page.php}}})

 Set it to this:

 {{{#!php
 <?php
    get_header();

    $page = $post;
    the_content();

    get_footer();
 ?>
 }}}



 It is likely due to this line in {{{post-template.php}}} around line 293:

 {{{#!php
 $elements = compact( 'page', 'more', 'preview', 'pages', 'multipage' );
 }}}

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


More information about the wp-trac mailing list