Skip to content

Commit

Permalink
Merge branch 'enclosures-render-patch' into 'master'
Browse files Browse the repository at this point in the history
Unset $retval after HOOK_FORMAT_ENCLOSURES.

Fixes an edge case where changing the array of enclosures with HOOK_FORMAT_ENCLOSURES might break the dropdown rendering if HOOK_RENDER_ENCLOSURE has no registered hooks.

See merge request !6
  • Loading branch information
cthu1hoo committed Aug 15, 2015
2 parents 28539f6 + 8493163 commit 98b0729
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions include/functions2.php
Original file line number Diff line number Diff line change
Expand Up @@ -1890,6 +1890,7 @@ function format_article_enclosures($id, $always_display_enclosures,
$rv = $retval;
}
}
unset($retval); // Unset to prevent breaking render if there are no HOOK_RENDER_ENCLOSURE hooks below.

if ($rv === '' && !empty($result)) {
$entries_html = array();
Expand Down

0 comments on commit 98b0729

Please sign in to comment.