Skip to content

Commit

Permalink
fxes #13: If a null value is given to $replace, don't let it get pass…
Browse files Browse the repository at this point in the history
…ed to str_replace.
  • Loading branch information
mattsqd committed Jul 31, 2024
1 parent 4831049 commit 4c1abef
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Robo/Plugin/Commands/ValidateCommands.php
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,9 @@ public function validateCommitMessages(
$opts
);
$replace = static function ($subject) use ($project_id) {
if (NULL === $subject) {
return $subject;
}
return str_replace(
'{$project_id}',
preg_quote($project_id),
Expand Down

0 comments on commit 4c1abef

Please sign in to comment.