Skip to content

Commit

Permalink
Fix "Deprecated: str_replace(): Passing null to parameter #2 ($replac…
Browse files Browse the repository at this point in the history
…e) of type array|string is deprecated" in TerminusModel.php
  • Loading branch information
Sergei Churilo committed Dec 16, 2021
1 parent 7f9eb38 commit 0943bfa
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Models/TerminusModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function getReferences()
*/
public function getUrl()
{
return str_replace('{id}', $this->id, $this->url);
return $this->id ? str_replace('{id}', $this->id, $this->url) : $this->url;
}

/**
Expand Down

0 comments on commit 0943bfa

Please sign in to comment.