[wp-trac] [WordPress Trac] #43463: defect: blind access of possibly negative of $pages in get_the_content

WordPress Trac noreply at wordpress.org
Sun Mar 4 01:40:26 UTC 2018


#43463: defect: blind access of possibly negative of $pages in get_the_content
--------------------------+-----------------------------
 Reporter:  ComputerGuru  |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  trunk
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Attached patch addresses PHP notices caused when JetPack OG is installed
 on a theme with header.php calling {{{ get_header() }}} as the first
 action before {{{ $page }}} is defined.

 Stack trace of notice:

 {{{
 get_header()
 wp-content/themes/knowhow/page.php:1
 locate_template()
 wp-includes/general-template.php:41
 load_template('~/wp-content/themes/knowhow/header.php')
 wp-includes/template.php:647
 wp_head()
 wp-content/themes/knowhow/header.php:14
 do_action('wp_head')
 wp-includes/general-template.php:2614
 jetpack_og_tags()
 wp-includes/class-wp-hook.php:286
 apply_filters('jetpack_open_graph_tags')
 wp-content/plugins/jetpack/functions.opengraph.php:216
 enhanced_og_image()
 wp-includes/class-wp-hook.php:288
 Jetpack_Media_Summary::get()
 wp-content/plugins/jetpack/modules/publicize/enhanced-open-graph.php:23
 Jetpack_Media_Summary::get_excerpt()
 wp-content/plugins/jetpack/_inc/lib/class.media-summary.php:57
 apply_filters('get_the_excerpt')
 wp-content/plugins/jetpack/_inc/lib/class.media-summary.php:314
 wp_trim_excerpt()
 wp-includes/class-wp-hook.php:286
 get_the_content()
 wp-includes/formatting.php:3308
 }}}

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


More information about the wp-trac mailing list