Skip to content

Instantly share code, notes, and snippets.

@paulgibbs
Last active December 14, 2016 12:48
Show Gist options
  • Save paulgibbs/98bd478c2b7ed1dff9586e8210187d63 to your computer and use it in GitHub Desktop.
Save paulgibbs/98bd478c2b7ed1dff9586e8210187d63 to your computer and use it in GitHub Desktop.
get_post_galleries bug in WP 4.7 branch and PHP 7.1
<?php
public function test_this_breaks_on_php71() {
$post_id = $this->factory->post->create( array(
'post_content' => 'blah [gallery] blah',
) );
$gallery = get_post_galleries( $post_id, false );
$this->assertSame( array( array( 'src' => array() ) ), $gallery );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment