* action=protect checks for invalid protection types and levels
* (bug 15673) Added indentation to format=wddxfm output and improved built-in
WDDX formatter to resemble PHP's more
+* (bug 15706) Empty values for apprtype and apprlevel are now silently ignored
+ rather than causing an exception
=== Languages updated in 1.14 ===
}
// Page protection filtering
- if (isset ($params['prtype'])) {
+ if (!empty ($params['prtype'])) {
$this->addTables('page_restrictions');
$this->addWhere('page_id=pr_page');
$this->addWhere('pr_expiry>' . $db->addQuotes($db->timestamp()));
$this->addWhereFld('pr_type', $params['prtype']);
- $prlevel = $params['prlevel'];
- if (!is_null($prlevel) && $prlevel != '' && $prlevel != '*')
+ // Remove the empty string and '*' from the prlevel array
+ $prlevel = array_diff($params['prlevel'], array('', '*'));
+ if (!empty($prlevel))
$this->addWhereFld('pr_level', $prlevel);
$this->addOption('DISTINCT');