Skip to content

Commit

Permalink
Merge pull request #421 from silverstripe-terraformers/bugfix/create-…
Browse files Browse the repository at this point in the history
…workflow-without-title

Pass arguments with preg_quote in the regex function
  • Loading branch information
dhensby authored Apr 22, 2020
2 parents 71e1351 + 468f939 commit f0ec1b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/DataObjects/WorkflowDefinition.php
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ public function getDefaultWorkflowTitle()
$tmp = [];

foreach ($defs as $def) {
$parts = preg_split("#\s#", $def, -1, PREG_SPLIT_NO_EMPTY);
$parts = preg_split("#\s#", preg_quote($def, '#'), -1, PREG_SPLIT_NO_EMPTY);
$lastPart = array_pop($parts);
$match = implode(' ', $parts);
// @todo do all this in one preg_match_all() call
Expand Down

0 comments on commit f0ec1b5

Please sign in to comment.