-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Use hydrator variable only when hydrator variable is assigned #6949
Conversation
@dkemper so no logical changes? |
No logical changes. |
$hydratorOrName | ||
)); | ||
} | ||
if (!$hydrator instanceof Hydrator\HydratorInterface) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't be reached when I call prepareAndInject(0, $fieldset)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, but in my case it throws a "Notice" undefined variable hydrator. So i will add a !isset($hydrator). Are you ok with it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'll have to check it out locally and see existing tests. Should be fine as-is
I will push my test. |
I'll merge as-is, seems like there was a bugfix after all ;-) |
The hydrator variable is not in use before $this->getHydratorFromName() is called. i just fixed the structure.