Skip to content

Commit 2761ca2

Browse files
committed
Merge branch '4.4' into 5.2
* 4.4: [Finder] Fix gitignore regex build with "**" Fixed deprecation warnings about passing null as parameter [Security] Keep Bulgarian wording consistent across all texts. Migrate configuration file for PHP CS Fixer 2.19/3.0 [Form] Replace broken ServerParams mock
2 parents 1d7781f + 8422396 commit 2761ca2

File tree

3 files changed

+8
-6
lines changed

3 files changed

+8
-6
lines changed

Compiler/CheckTypeDeclarationsPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ private function checkType(Definition $checkedDefinition, $value, \ReflectionPar
205205
if ($value instanceof Definition) {
206206
$class = $value->getClass();
207207

208-
if (isset(self::BUILTIN_TYPES[strtolower($class)])) {
208+
if ($class && isset(self::BUILTIN_TYPES[strtolower($class)])) {
209209
$class = strtolower($class);
210210
} elseif (!$class || (!$this->autoload && !class_exists($class, false) && !interface_exists($class, false))) {
211211
return;

Compiler/RegisterServiceSubscribersPass.php

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,10 +88,12 @@ protected function processValue($value, bool $isRoot = false)
8888
$serviceMap[$key] = new Reference($type);
8989
}
9090

91-
if (false !== $i = strpos($name, '::get')) {
92-
$name = lcfirst(substr($name, 5 + $i));
93-
} elseif (false !== strpos($name, '::')) {
94-
$name = null;
91+
if ($name) {
92+
if (false !== $i = strpos($name, '::get')) {
93+
$name = lcfirst(substr($name, 5 + $i));
94+
} elseif (false !== strpos($name, '::')) {
95+
$name = null;
96+
}
9597
}
9698

9799
if (null !== $name && !$this->container->has($name) && !$this->container->has($type.' $'.$name)) {

Compiler/ResolveBindingsPass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ protected function processValue($value, bool $isRoot = false)
178178

179179
$typeHint = ProxyHelper::getTypeHint($reflectionMethod, $parameter);
180180

181-
if (\array_key_exists($k = ltrim($typeHint, '\\').' $'.$parameter->name, $bindings)) {
181+
if ($typeHint && \array_key_exists($k = ltrim($typeHint, '\\').' $'.$parameter->name, $bindings)) {
182182
$arguments[$key] = $this->getBindingValue($bindings[$k]);
183183

184184
continue;

0 commit comments

Comments
 (0)