Skip to content

Commit

Permalink
fix: TypeError: trim(): Argument #1 ($string) must be of type string,…
Browse files Browse the repository at this point in the history
… null given
  • Loading branch information
chaz6chez committed Sep 24, 2024
1 parent 188296d commit 408cfab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Traits/RegistrarMethods.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function registrarStop(Worker $worker): void
*/
public function registrarGetHostIp(): string
{
return $this->registrarHostIp ?: ($this->registrarHostIp = trim(shell_exec('curl -s ifconfig.me')));
return $this->registrarHostIp ?: ($this->registrarHostIp = trim(shell_exec('curl -s ifconfig.me') ?: ''));
}

/**
Expand Down

0 comments on commit 408cfab

Please sign in to comment.