Skip to content

Commit 58b14a5

Browse files
authored
Merge pull request #227 from homersimpsons/fix/ressource-null-check-variable
ScalarBeanPropertyDescriptor: Fix variable for resource null check
2 parents 1a056bc + 4eed2f7 commit 58b14a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Utils/ScalarBeanPropertyDescriptor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,7 @@ public function getGetterSetterCode(): array
224224
if ($normalizedType === 'resource') {
225225
$checkNullable = '';
226226
if ($isNullable) {
227-
$checkNullable = sprintf('$%s !== null && ', $this->column->getName());
227+
$checkNullable = sprintf('$%s !== null && ', $variableName);
228228
}
229229
$resourceTypeCheck .= <<<EOF
230230
if (%s!\is_resource($%s)) {

0 commit comments

Comments
 (0)