Fixed error in Session::getFlashObject() if Flex Form is being used

This commit is contained in:
Matias Griese
2019-09-05 15:45:29 +03:00
parent b601d2c8fd
commit dac3e57fd4
2 changed files with 2 additions and 1 deletions

View File

@@ -8,6 +8,7 @@
1. [](#bugfix)
* Regression: Fixed language fallback
* Regression: Allow SVG avatar images for users
* Fixed error in `Session::getFlashObject()` if Flex Form is being used
# v1.7.0-beta.7
## 08/30/2019

View File

@@ -125,7 +125,7 @@ class Session extends \Grav\Framework\Session\Session
/** @var FormFlash $flash */
$flash = $form ? $form->getFlash() : null;
$object = $flash ? [$sessionField => $flash->getLegacyFiles()] : null;
$object = $flash && method_exists($flash, 'getLegacyFiles') ? [$sessionField => $flash->getLegacyFiles()] : null;
}
}