]> git.wh0rd.org Git - tt-rss.git/commitdiff
Unset $retval after HOOK_FORMAT_ENCLOSURES.
authorJustAMacUser <donotreply@example.org>
Fri, 14 Aug 2015 00:46:45 +0000 (20:46 -0400)
committerJustAMacUser <donotreply@example.org>
Fri, 14 Aug 2015 23:42:30 +0000 (19:42 -0400)
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.

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();