]> git.wh0rd.org - tt-rss.git/commitdiff
Merge branch 'enclosures-render-patch' into 'master'
authorAndrew Dolgov <cthulhoo@gmail.com>
Sat, 15 Aug 2015 06:35:11 +0000 (09:35 +0300)
committerAndrew Dolgov <cthulhoo@gmail.com>
Sat, 15 Aug 2015 06:35:11 +0000 (09:35 +0300)
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

include/functions2.php

index b4018453ebd6413a108002ec95a5d4a8e80b42ee..445e9e0225b03ea98476eedad305b0ddd22857d3 100644 (file)
                                $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();