Skip to content

Commit db617ef

Browse files
committed
ContainerBuilder: @service name must not be empty
1 parent 6437cc9 commit db617ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/DI/ContainerBuilder.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -781,7 +781,7 @@ public function formatPhp($statement, $args)
781781
} elseif (substr($val, 0, 2) === '@@') {
782782
$val = substr($val, 1);
783783

784-
} elseif (substr($val, 0, 1) === '@') {
784+
} elseif (substr($val, 0, 1) === '@' && strlen($val) > 1) {
785785
$pair = explode('::', $val, 2);
786786
$name = $this->getServiceName($pair[0]);
787787
if (isset($pair[1]) && preg_match('#^[A-Z][A-Z0-9_]*\z#', $pair[1], $m)) {

0 commit comments

Comments
 (0)