Skip to content

Commit

Permalink
Adding fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bindlegirl committed Jan 19, 2023
1 parent c94eb1e commit c8a5269
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions projects/plugins/jetpack/changelog/fix-amp-infinity-bug
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Significance: patch
Type: bugfix

Fixing AMP related bug
Original file line number Diff line number Diff line change
Expand Up @@ -1859,7 +1859,7 @@ public function amp_load_hooks() {
add_action( 'template_redirect', array( $this, 'amp_start_output_buffering' ), 0 );
add_action( 'shutdown', array( $this, 'amp_output_buffer' ), 1 );

if ( is_callable( "amp_{$template}_hooks" ) ) {
if ( is_string( $template ) && strpos( $template, '::' ) === false && is_callable( "amp_{$template}_hooks" ) ) {
call_user_func( "amp_{$template}_hooks" );
}

Expand Down

0 comments on commit c8a5269

Please sign in to comment.