Fix injection on Form posts

In use with Silvershop, a form post from the AddProductForm would pass the form trough the `afterCallActionHandler` as the `$result`. This causes the `getValue` to error. By checking if the result is an instance of `DBHTMLText` this error can't happen anymore.
This commit is contained in:
Bram de Leeuw 2019-09-04 10:22:29 +02:00 committed by Jono Menz
parent 1c61f86f36
commit da6e75c1b1
1 changed files with 4 additions and 0 deletions

View File

@ -50,6 +50,10 @@ class BetterNavigatorExtension extends DataExtension
return $result;
}
if (!($result instanceof DBHTMLText)) {
return $result;
}
$html = $result->getValue();
$navigatorHTML = $this->generateNavigator()->getValue();