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) {
124124 if (observerDisabledAttribute != null
125125 && observerDisabledAttribute .getValue () != null
126126 && observerDisabledAttribute .getValue ().equals ("true" )
127+ && !observerName .isEmpty ()
127128 ) {
128- if (modulesWithSameObserverName .isEmpty ()) {
129+ @ Nullable XmlAttributeValue valueElement = observerNameAttribute .getValueElement ();
130+ if (modulesWithSameObserverName .isEmpty () && valueElement != null ) {
129131 problemsHolder .registerProblem (
130- observerNameAttribute . getValueElement () ,
132+ valueElement ,
131133 inspectionBundle .message (
132134 "inspection.observer.disabledObserverDoesNotExist"
133135 ),
Original file line number Diff line number Diff line change @@ -118,14 +118,16 @@ public void visitFile(final PsiFile file) {
118118 if (pluginTypeDisabledAttribute != null
119119 && pluginTypeDisabledAttribute .getValue () != null
120120 && pluginTypeDisabledAttribute .getValue ().equals ("true" )
121+ && !pluginTypeName .isEmpty ()
121122 ) {
122- if (modulesWithSamePluginName .isEmpty ()) {
123+ @ Nullable XmlAttributeValue valueElement = pluginTypeNameAttribute .getValueElement ();
124+ if (modulesWithSamePluginName .isEmpty () && valueElement != null ) {
123125 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
129131 );
130132 } else {
131133 continue ;
You can’t perform that action at this time.
0 commit comments