API: Account for PHP 7.2 change
authorBrad Jorsch <bjorsch@wikimedia.org>
Mon, 4 Dec 2017 18:36:48 +0000 (13:36 -0500)
committerBrad Jorsch <bjorsch@wikimedia.org>
Mon, 4 Dec 2017 18:46:33 +0000 (13:46 -0500)
commit9f8626100049a3cd37e23744ed235000c3fef3c8
tree9101a241553fe32790f78b3457674d4c4a86b255
parent123795273134139f1017bf91d31b9a2840e85b78
API: Account for PHP 7.2 change

PHP 7.2 broke existing functionality in making count( null ) raise a
warning. So add tests for null all over the place, or change tests where
we know the value is null or an array (but not false, empty-string, or
0) to just cast to boolean.

Bug: T182004
Change-Id: Idfe23a07daa9f60eee72f2daf04304be87057a29
16 files changed:
includes/api/ApiDelete.php
includes/api/ApiEditPage.php
includes/api/ApiImageRotate.php
includes/api/ApiOptions.php
includes/api/ApiQueryAllPages.php
includes/api/ApiQueryBacklinks.php
includes/api/ApiQueryBacklinksprop.php
includes/api/ApiQueryBase.php
includes/api/ApiQueryCategoryMembers.php
includes/api/ApiQueryExtLinksUsage.php
includes/api/ApiQueryLinks.php
includes/api/ApiRevisionDelete.php
includes/api/ApiRollback.php
includes/api/ApiSetPageLanguage.php
includes/api/ApiTag.php
includes/api/ApiUserrights.php