Skip to content

Commit ea35cb5

Browse files
committed
Handle boolean false values when generating HTTP requests.
1 parent a1d3d82 commit ea35cb5

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

src/Parameters/MetaParameters.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,11 @@ protected function buildMeta(&$queries)
5555
{
5656
if (count($this->meta) !== 0) {
5757
foreach ($this->meta as $k => $v) {
58-
$queries['meta_' . $k] = $v;
58+
if (!is_bool($v)) {
59+
$queries['meta_' . $k] = $v;
60+
} else {
61+
$queries['meta_' . $k] = $v ? 'true' : 'false';
62+
}
5963
}
6064
}
6165
}

src/Parameters/UserDataParameters.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
* You should have received a copy of the GNU Lesser General Public License along
1717
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
18-
*/
18+
*/
1919
namespace BigBlueButton\Parameters;
2020

2121
/**
@@ -55,7 +55,11 @@ protected function buildUserData(&$queries)
5555
{
5656
if (count($this->userData) !== 0) {
5757
foreach ($this->userData as $k => $v) {
58-
$queries['userdata-' . $k] = $v;
58+
if (!is_bool($v)) {
59+
$queries['userdata-' . $k] = $v;
60+
} else {
61+
$queries['userdata-' . $k] = $v ? 'true' : 'false';
62+
}
5963
}
6064
}
6165
}

0 commit comments

Comments
 (0)