mirror of
https://github.com/jonom/silverstripe-betternavigator.git
synced 2024-10-22 14:05:51 +02:00
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:
parent
1c61f86f36
commit
da6e75c1b1
@ -50,6 +50,10 @@ class BetterNavigatorExtension extends DataExtension
|
||||
return $result;
|
||||
}
|
||||
|
||||
if (!($result instanceof DBHTMLText)) {
|
||||
return $result;
|
||||
}
|
||||
|
||||
$html = $result->getValue();
|
||||
$navigatorHTML = $this->generateNavigator()->getValue();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user