diff --git a/src/Proxy/AbstractProxy.php b/src/Proxy/AbstractProxy.php index da9a4daa..9577a483 100644 --- a/src/Proxy/AbstractProxy.php +++ b/src/Proxy/AbstractProxy.php @@ -106,7 +106,7 @@ protected function getParameterCode(ReflectionParameter $parameter) if (PHP_VERSION_ID >= 70000) { $reflectionType = $parameter->getType(); if ($reflectionType) { - $nullablePrefix = $reflectionType->allowsNull() ? '?' : ''; + $nullablePrefix = (PHP_VERSION_ID >= 70100 && $reflectionType->allowsNull()) ? '?' : ''; $nsPrefix = $reflectionType->isBuiltin() ? '' : '\\'; $type = $nullablePrefix . $nsPrefix . (string) $reflectionType; }