mirror of
https://github.com/gamaio/lobli.git
synced 2025-01-08 17:52:50 +00:00
Add forgotten semicolon on line 52.
I was wondering why my script had suddenly stopped working and thought it was a Redis problem. Turns out that I was getting PHP parse errors and didn't check the logs
This commit is contained in:
parent
c02e6d6f28
commit
9cabd24d19
@ -41,7 +41,7 @@
|
||||
// Try to find it in the redis db first, if not there, add it
|
||||
|
||||
$short = $redis->get($link);
|
||||
if (!$short) {
|
||||
if (!$short || $short == null) {
|
||||
$sql = "SELECT * FROM `links` WHERE `shortlink` = '$link' LIMIT 1;";
|
||||
if($result = $shortdb->query($sql)){
|
||||
if($row = $result->fetch_assoc()){
|
||||
@ -49,12 +49,16 @@
|
||||
|
||||
$redis->set($link, $llink);
|
||||
|
||||
echo $llink
|
||||
echo $llink;
|
||||
|
||||
//header("location:$link");
|
||||
exit(5); // Stop script execution to save on resources
|
||||
}
|
||||
}
|
||||
}else{
|
||||
echo $short;
|
||||
exit(5);
|
||||
}
|
||||
}
|
||||
|
||||
// exit codes:
|
||||
|
Loading…
Reference in New Issue
Block a user