mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 16:54:04 +02:00
Form: Fix don't pass null values to strtolower() error
This commit is contained in:
parent
777d146ba1
commit
4782df4fee
@ -1221,7 +1221,8 @@ class Form extends Zend_Form
|
|||||||
*/
|
*/
|
||||||
public function isSubmitted()
|
public function isSubmitted()
|
||||||
{
|
{
|
||||||
if (strtolower($this->getRequest()->getMethod()) !== $this->getMethod()) {
|
$requestMethod = $this->getRequest()->getMethod();
|
||||||
|
if (strtolower($requestMethod ?: '') !== $this->getMethod()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if ($this->getIsApiTarget() || $this->getRequest()->isApiRequest()) {
|
if ($this->getIsApiTarget() || $this->getRequest()->isApiRequest()) {
|
||||||
@ -1488,7 +1489,8 @@ class Form extends Zend_Form
|
|||||||
*/
|
*/
|
||||||
protected function getRequestData()
|
protected function getRequestData()
|
||||||
{
|
{
|
||||||
if (strtolower($this->request->getMethod()) === $this->getMethod()) {
|
$requestMethod = $this->getRequest()->getMethod();
|
||||||
|
if (strtolower($requestMethod ?: '') === $this->getMethod()) {
|
||||||
return $this->request->{'get' . ($this->request->isPost() ? 'Post' : 'Query')}();
|
return $this->request->{'get' . ($this->request->isPost() ? 'Post' : 'Query')}();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user