Commit e450de8cd0

e450de8cd009207a0d7a14537eeaef8ead0ae370

parent: 468bc55ada

Unsigned

cmc <hello@cleberg.net> · 2023-06-01 02:01 UTC

fix missing var assignment

Layout: unified · split

index.php +3 −3
@@ -5,9 +5,9 @@ $path = ltrim($_SERVER['REQUEST_URI'], '/');
5$elements = explode('/', $path); 5$elements = explode('/', $path);
6 6
7if (empty($elements[0])) { 7if (empty($elements[0])) {
8 get_stories( 8 $html_output = get_stories(
9 'https://hacker-news.firebaseio.com/v0/topstories.json?limitToFirst=30&orderBy="$key"', 9 'https://hacker-news.firebaseio.com/v0/topstories.json?limitToFirst=30&orderBy="$key"',
10 'Top' 10 'Top'
11 ); 11 );
12 echo_html( 12 echo_html(
13 $GLOBALS['full_domain'] . '/best/', 13 $GLOBALS['full_domain'] . '/best/',
@@ -18,7 +18,7 @@ if (empty($elements[0])) {
18} else { 18} else {
19 switch (array_shift($elements)) { 19 switch (array_shift($elements)) {
20 case 'top': 20 case 'top':
21 get_stories( 21 $html_output = get_stories(
22 'https://hacker-news.firebaseio.com/v0/topstories.json?limitToFirst=30&orderBy="$key"', 22 'https://hacker-news.firebaseio.com/v0/topstories.json?limitToFirst=30&orderBy="$key"',
23 'Top' 23 'Top'
24 ); 24 );