I have a category dropdown within my searchform.php, coding within Wordpress 4.x. It has worked without issue for a couple of years.
An issue has arisen with Wordpress 5.2.
searchform.php includes a modified form for the search and a dropdown menu for categories using
get_search_form() outputs nothing.
A précis of
<div> $args = array ( ...some arguments... ); wp_dropdown_categories($args); <form>... search code ...</form>
if I remove
wp_dropdown_categories() and insert it in the calling page before
get_search_form() it works perfectly.
There are no PHP errors or warnings.
Whereas separating the two function calls is no problem, I am curious as to what might be happening and under what circumstances
get_search_form() can fail without returning any error.