Skip to content

Commit

Permalink
Ignore if bad dsn
Browse files Browse the repository at this point in the history
  • Loading branch information
GDXbsv committed Sep 24, 2024
1 parent 5e9aea4 commit 9938d50
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/Endpoint.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@
*/
final class Endpoint
{
public static function web(string $dsnString, string $prefix = 'app'): void
public static function web(mixed $dsnString, string $prefix = 'app'): void
{
if (!is_string($dsnString) || empty($dsnString)) {
return;
}
if ((isset($_GET['profile']) || isset($_GET['timer'])) && extension_loaded('excimer')) {
$excimer = ExcimerS3::ofDsn($dsnString);
if (isset($_GET['profile']) && is_string($_GET['profile'])) {
Expand All @@ -23,8 +26,11 @@ public static function web(string $dsnString, string $prefix = 'app'): void
}
}

public static function cli(string $dsnString, string $prefix = 'app'): void
public static function cli(mixed $dsnString, string $prefix = 'app'): void
{
if (!is_string($dsnString) || empty($dsnString)) {
return;
}
if (extension_loaded('excimer') && ((getenv("PROFILE") !== false) || (getenv("TIMER") !== false))) {
$excimer = ExcimerS3::ofDsn($dsnString);
$profilePath = getenv("PROFILE");
Expand Down

0 comments on commit 9938d50

Please sign in to comment.