File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
app/code/Magento/Rule/Model/Condition/Sql Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -212,6 +212,7 @@ public function attachConditionToCollection(
212
212
// Select ::where method adds braces even on empty expression
213
213
$ collection ->getSelect ()->where ($ whereExpression );
214
214
}
215
+ $ this ->productCollection = null ;
215
216
}
216
217
217
218
/**
@@ -228,9 +229,10 @@ private function canAttributeHaveDefaultValue($attributeCode)
228
229
// It's not exceptional case as we want to check if we have such attribute or not
229
230
$ attribute = null ;
230
231
}
231
- $ storeId = $ this ->productCollection ->getStoreId ();;
232
- $ defaultStoreId = $ this ->productCollection ->getDefaultStoreId ();
232
+ $ isNotDefaultStoreUsed = $ this ->productCollection !== null
233
+ ? (int )$ this ->productCollection ->getStoreId () !== (int ) $ this ->productCollection ->getDefaultStoreId ()
234
+ : false ;
233
235
234
- return $ storeId != $ defaultStoreId && $ attribute !== null && !$ attribute ->isScopeGlobal ();
236
+ return $ isNotDefaultStoreUsed && $ attribute !== null && !$ attribute ->isScopeGlobal ();
235
237
}
236
238
}
You can’t perform that action at this time.
0 commit comments