Skip to content

Commit

Permalink
Merge pull request #227 from homersimpsons/fix/ressource-null-check-v…
Browse files Browse the repository at this point in the history
…ariable

ScalarBeanPropertyDescriptor: Fix variable for resource null check
  • Loading branch information
moufmouf committed Sep 7, 2020
2 parents 1a056bc + 4eed2f7 commit 58b14a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Utils/ScalarBeanPropertyDescriptor.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 .= <<<EOF
if (%s!\is_resource($%s)) {
Expand Down

0 comments on commit 58b14a5

Please sign in to comment.