8000 check null before calling getFormTypeClassOnParameter in FormUtil #650 · Ma27/idea-php-symfony2-plugin@6248869 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6248869

Browse files
committed
check null before calling getFormTypeClassOnParameter in FormUtil Haehnchen#650
1 parent dfb1c16 commit 6248869

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/fr/adrienbrault/idea/symfony2plugin/form/util/FormUtil.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,9 @@ public static PhpClass getFormTypeClass(@Nullable MethodReference calledMethodRe
142142

143143
// $form = "$this->createForm("new Type()", $entity)";
144144
PsiElement formType = PsiElementUtils.getMethodParameterPsiElementAt(calledMethodReference, 0);
145+
if(formType == null) {
146+
return null;
147+
}
145148

146149
return getFormTypeClassOnParameter(formType);
147150
}

0 commit comments

Comments
 (0)
0