File tree Expand file tree Collapse file tree 2 files changed +12
-8
lines changed
src/com/magento/idea/magento2plugin/inspections/xml Expand file tree Collapse file tree 2 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -124,10 +124,12 @@ public void visitFile(final PsiFile file) {
124
124
if (observerDisabledAttribute != null
125
125
&& observerDisabledAttribute .getValue () != null
126
126
&& observerDisabledAttribute .getValue ().equals ("true" )
127
+ && !observerName .isEmpty ()
127
128
) {
128
- if (modulesWithSameObserverName .isEmpty ()) {
129
+ @ Nullable XmlAttributeValue valueElement = observerNameAttribute .getValueElement ();
130
+ if (modulesWithSameObserverName .isEmpty () && valueElement != null ) {
129
131
problemsHolder .registerProblem (
130
- observerNameAttribute . getValueElement () ,
132
+ valueElement ,
131
133
inspectionBundle .message (
132
134
"inspection.observer.disabledObserverDoesNotExist"
133
135
),
Original file line number Diff line number Diff line change @@ -118,14 +118,16 @@ public void visitFile(final PsiFile file) {
118
118
if (pluginTypeDisabledAttribute != null
119
119
&& pluginTypeDisabledAttribute .getValue () != null
120
120
&& pluginTypeDisabledAttribute .getValue ().equals ("true" )
121
+ && !pluginTypeName .isEmpty ()
121
122
) {
122
- if (modulesWithSamePluginName .isEmpty ()) {
123
+ @ Nullable XmlAttributeValue valueElement = pluginTypeNameAttribute .getValueElement ();
124
+ if (modulesWithSamePluginName .isEmpty () && valueElement != null ) {
123
125
problemsHolder .registerProblem (
124
- pluginTypeNameAttribute . getValueElement () ,
125
- inspectionBundle .message (
126
- "inspection.plugin.disabledPluginDoesNotExist"
127
- ),
128
- errorSeverity
126
+ valueElement ,
127
+ inspectionBundle .message (
128
+ "inspection.plugin.disabledPluginDoesNotExist"
129
+ ),
130
+ errorSeverity
129
131
);
130
132
} else {
131
133
continue ;
You can’t perform that action at this time.
0 commit comments