Index: trunk/phase3/includes/api/ApiBase.php |
— | — | @@ -532,8 +532,8 @@ |
533 | 533 | array_shift( $required ); |
534 | 534 | |
535 | 535 | $intersection = array_intersect( array_keys( array_filter( $params, |
536 | | - create_function( '$x', 'return !is_null($x) && $x !== false;' ) |
537 | | - ) ), $required ); |
| 536 | + "validateParameter" ) ), $required ); |
| 537 | + |
538 | 538 | if ( count( $intersection ) > 1 ) { |
539 | 539 | $this->dieUsage( 'The parameters ' . implode( ', ', $intersection ) . ' can not be used together', 'invalidparammix' ); |
540 | 540 | } elseif ( count( $intersection ) == 0 ) { |
— | — | @@ -541,6 +541,10 @@ |
542 | 542 | } |
543 | 543 | } |
544 | 544 | |
| 545 | + private function validateParameter( $x ) { |
| 546 | + return !is_null( $x ) && $x !== false; |
| 547 | + } |
| 548 | + |
545 | 549 | /** |
546 | 550 | * @deprecated use MWNamespace::getValidNamespaces() |
547 | 551 | */ |