Skip to content

Commit

Permalink
Small fix to make sure no errors are shown to the public
Browse files Browse the repository at this point in the history
  • Loading branch information
slmnio committed Aug 18, 2021
1 parent f8479c9 commit 04e9db9
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions website/public/index.php
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
<?php

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);


function fetch($url) {
$ch = curl_init();
$timeout = 3;
Expand All @@ -27,7 +22,11 @@ function getRedirectData($pathData) {
return null;
// just go to normal page and let the site handle or 404 it
} else {
return $redirect->outgoing_url;
try {
return $redirect->outgoing_url;
} catch (Exception $ee) {
return null;
}
}
} catch (Exception $e) {
// echo "error: " . json_encode($e);
Expand Down

0 comments on commit 04e9db9

Please sign in to comment.