From 3b3675a7ff12ee2b86b5caf57579d161031f3c3d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gerg=C5=91=20Tisza?= Date: Sat, 23 Apr 2016 16:27:02 +0000 Subject: [PATCH] Make HTMLCheckField::loadDataFromRequest always return a boolean Bug: T133163 Change-Id: I4592d9a44c6ca4d3f680a53ecfd628f385a65c09 --- includes/htmlform/HTMLCheckField.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/htmlform/HTMLCheckField.php b/includes/htmlform/HTMLCheckField.php index a59b15e828..4a6b804730 100644 --- a/includes/htmlform/HTMLCheckField.php +++ b/includes/htmlform/HTMLCheckField.php @@ -111,7 +111,7 @@ class HTMLCheckField extends HTMLFormField { /** * @param WebRequest $request * - * @return string + * @return bool */ function loadDataFromRequest( $request ) { $invert = isset( $this->mParams['invert'] ) && $this->mParams['invert']; @@ -125,7 +125,7 @@ class HTMLCheckField extends HTMLFormField { ? !$request->getBool( $this->mName ) : $request->getBool( $this->mName ); } else { - return $this->getDefault(); + return (bool)$this->getDefault(); } } } -- 2.20.1