From 4eed2f7be4f7d66baf93f0b53d77317db542dd76 Mon Sep 17 00:00:00 2001 From: Guillaume Date: Fri, 4 Sep 2020 15:53:50 +0200 Subject: [PATCH] ScalarBeanPropertyDescriptor: Fix variable for resource null check --- src/Utils/ScalarBeanPropertyDescriptor.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Utils/ScalarBeanPropertyDescriptor.php b/src/Utils/ScalarBeanPropertyDescriptor.php index e965569c..8835706e 100644 --- a/src/Utils/ScalarBeanPropertyDescriptor.php +++ b/src/Utils/ScalarBeanPropertyDescriptor.php @@ -224,7 +224,7 @@ public function getGetterSetterCode(): array if ($normalizedType === 'resource') { $checkNullable = ''; if ($isNullable) { - $checkNullable = sprintf('$%s !== null && ', $this->column->getName()); + $checkNullable = sprintf('$%s !== null && ', $variableName); } $resourceTypeCheck .= <<