Index: trunk/phase3/includes/api/ApiQueryAllpages.php |
— | — | @@ -95,10 +95,13 @@ |
96 | 96 | $this->addWhere( 'pr_expiry>' . $db->addQuotes( $db->timestamp() ) ); |
97 | 97 | $this->addWhereFld( 'pr_type', $params['prtype'] ); |
98 | 98 | |
99 | | - // Remove the empty string and '*' from the prlevel array |
100 | | - $prlevel = array_diff( $params['prlevel'], array( '', '*' ) ); |
101 | | - if ( !empty( $prlevel ) ) |
102 | | - $this->addWhereFld( 'pr_level', $prlevel ); |
| 99 | + if ( isset ( $params['prlevel'] ) ) { |
| 100 | + // Remove the empty string and '*' from the prlevel array |
| 101 | + $prlevel = array_diff( $params['prlevel'], array( '', '*' ) ); |
| 102 | + |
| 103 | + if ( !empty( $prlevel ) ) |
| 104 | + $this->addWhereFld( 'pr_level', $prlevel ); |
| 105 | + } |
103 | 106 | if ( $params['prfiltercascade'] == 'cascading' ) |
104 | 107 | $this->addWhereFld( 'pr_cascade', 1 ); |
105 | 108 | else if ( $params['prfiltercascade'] == 'noncascading' ) |