Fix regex escaping, fixes #5674
parent
429ee5f8eb
commit
ec2660fe78
|
@ -226,7 +226,7 @@ class EventDispatcher
|
||||||
$possibleLocalBinaries = $this->composer->getPackage()->getBinaries();
|
$possibleLocalBinaries = $this->composer->getPackage()->getBinaries();
|
||||||
if ($possibleLocalBinaries) {
|
if ($possibleLocalBinaries) {
|
||||||
foreach ($possibleLocalBinaries as $localExec) {
|
foreach ($possibleLocalBinaries as $localExec) {
|
||||||
if (preg_match("/\b${callable}$/", $localExec)) {
|
if (preg_match('{\b'.preg_quote($callable).'$}', $localExec)) {
|
||||||
$caller = BinaryInstaller::determineBinaryCaller($localExec);
|
$caller = BinaryInstaller::determineBinaryCaller($localExec);
|
||||||
$exec = preg_replace('{^'.preg_quote($callable).'}', $caller . ' ' . $localExec, $exec);
|
$exec = preg_replace('{^'.preg_quote($callable).'}', $caller . ' ' . $localExec, $exec);
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue