Commit dd5e1054f0

dd5e1054f0b6b5a808e9654932bf33c7f089e5f4

parent: 2283d12f6f

Verified · cmc

cmc <hello@cleberg.net> · 2026-10-22 20:38 UTC

search: quote $_SERVER keys

PHP 8 treats $_SERVER[HTTP_HOST] as an undefined constant, so the page
died with a fatal error for any post from an unfollowed blog.

Layout: unified · split

search.php +1 −1
@@ -245,7 +245,7 @@
245245
246246 if ($post->followed != true) {
247247 // Send user to action.php to follow a new blog
248 $query_string = 'action=follow&blog_name=' . urlencode($post->blog_name) . '&callback=' . urlencode('https://' . $_SERVER[HTTP_HOST] . $_SERVER[REQUEST_URI]);
248 $query_string = 'action=follow&blog_name=' . urlencode($post->blog_name) . '&callback=' . urlencode('https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']);
249249 $card_columns .= '<a href="action.php?' . htmlentities($query_string) . '"><i data-feather="user-plus"></i></a></div>';
250250 } else {
251251 $card_columns .= '</div>';