clickstorm / cs_seo

[clickstorm] SEO
Other
33 stars 49 forks source link

Wrong TS condition leads to exception #237

Closed derghostface closed 5 years ago

derghostface commented 5 years ago

The condition [getTSFE().beUserLogin] in some scenarios leads to an exception, because there is no check on getTSFE() before:

"expression":"getTSFE().beUserLogin", "exception":"RuntimeException: Unable to get a property on a non-object. in htdocs\/vendor\/symfony\/expression-language\/Node\/GetAttrNode.php:73\nStack trace:\n#0

In our case this lead to an error on a detail view of an extbase plugin on a very high frequented site. So I think this is critical and should be fixed as soon as possible.

The correct condition which solves this issue is: [getTSFE() && getTSFE().isBackendUserLoggedIn() == 1]

mhirdes commented 5 years ago

Thanks for the hint. Fix is integrated.