diff --git a/core/basethemelet.php b/core/basethemelet.php index 3461eed3..1d3735f6 100644 --- a/core/basethemelet.php +++ b/core/basethemelet.php @@ -202,7 +202,7 @@ class BaseThemelet * @param bool $empty_option Whether the first option should be an empty one. * @param array $selected_options The values of options that should be pre-selected. */ - protected function build_selector(string $name, array $options, bool $required=false, bool $multiple=false, bool $empty_option=false, array $selected_options=[]): string + protected function build_selector(string $name, array $options, bool $required=false, bool $multiple=false, bool $empty_option=false, array $selected_options=[]): HTMLElement { $attrs = []; if ($required) { @@ -228,6 +228,6 @@ class BaseThemelet } } - return (string)$s; + return $s; } } diff --git a/ext/pools/theme.php b/ext/pools/theme.php index 9dd7962f..f0c0eca1 100644 --- a/ext/pools/theme.php +++ b/ext/pools/theme.php @@ -41,8 +41,7 @@ class PoolsTheme extends Themelet public function get_adder_html(Image $image, array $pools): string { $selector = $this->build_selector("pool_id", $pools); - return "\n" . make_form(make_link("pool/add_post")) . " - $selector + return "\n" . make_form(make_link("pool/add_post")) . $selector . " @@ -388,7 +387,7 @@ class PoolsTheme extends Themelet public function get_bulk_pool_selector(array $options): string { - return $this->build_selector("bulk_pool_select", $options, required: true, empty_option: true); + return (string)$this->build_selector("bulk_pool_select", $options, required: true, empty_option: true); } public function get_bulk_pool_input(array $search_terms): string diff --git a/ext/rating/theme.php b/ext/rating/theme.php index 895a3633..f33ed906 100644 --- a/ext/rating/theme.php +++ b/ext/rating/theme.php @@ -33,8 +33,8 @@ class RatingsTheme extends Themelet $html = make_form(make_link("admin/update_ratings"))."
Change | ".$this->build_selector("rating_old", $current_ratings, required: true)." |
---|---|
To | ".$this->build_selector("rating_new", Ratings::get_ratings_dict(), required: true)." |
Change | " . $this->build_selector("rating_old", $current_ratings, required: true) . " |
To | " . $this->build_selector("rating_new", Ratings::get_ratings_dict(), required: true) . " |