You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is is a common issue to try to fetch data from objects like products with $product->getData('attribute') but depending on the source of those objects (for example if they come from an collection) the attribute is not loaded.
I would suggest to at least add a warning
if (!$this->hasData('attribute')) {
$logger->warning('Trying to access not existing / not loaded attribute');
}
This would improve the developer experience.
DanieliMi, kolaente and DavidLambauerthomas-kl1, ihor-sviziev, scottsb and pushberryfinn