krz/hn

A brutalist web client for Hacker News.

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

325a5499cd9cdd69c964031af9ec7bc0346efad7

unsigned

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

fix error with global vars
 index.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/index.php b/index.php
index 28a2cfe..c9f9a7e 100644
--- a/index.php
+++ b/index.php
@@ -1,8 +1,8 @@
 <?php
 
-global $full_domain = 'https://hn.cleberg.net',
-	$path = ltrim($_SERVER['REQUEST_URI'], '/'),
-	$elements = explode('/', $path);
+$full_domain = 'https://hn.cleberg.net';
+$path = ltrim($_SERVER['REQUEST_URI'], '/');
+$elements = explode('/', $path);
 
 if (empty($elements[0])) {
 	$html_output = get_stories(