krz/hn

A brutalist web client for Hacker News.

clone: git clone https://gitbay.org/krz/hn.git

e450de8cd009207a0d7a14537eeaef8ead0ae370

unsigned

author: Christian Cleberg <hello@cleberg.net> · 2023-06-01T02:01:37Z

fix missing var assignment
 index.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/index.php b/index.php
index f5f7438..436420e 100644
--- a/index.php
+++ b/index.php
@@ -5,9 +5,9 @@ $path = ltrim($_SERVER['REQUEST_URI'], '/');
 $elements = explode('/', $path);
 
 if (empty($elements[0])) {
-        get_stories(
+        $html_output = get_stories(
                 'https://hacker-news.firebaseio.com/v0/topstories.json?limitToFirst=30&orderBy="$key"',
-                 'Top'
+                'Top'
         );
         echo_html(
        		$GLOBALS['full_domain'] . '/best/',
@@ -18,7 +18,7 @@ if (empty($elements[0])) {
 } else {
 	switch (array_shift($elements)) {
 		case 'top':
-			get_stories(
+			$html_output = get_stories(
                                 'https://hacker-news.firebaseio.com/v0/topstories.json?limitToFirst=30&orderBy="$key"',
 			        'Top'
 		        );