Index: branches/RL2/extensions/Gadgets/backend/Gadget.php |
— | — | @@ -87,7 +87,12 @@ |
88 | 88 | // Do the actual validation of this property |
89 | 89 | $func = $validation[0]; |
90 | 90 | if ( !$func( $val ) ) { |
91 | | - return Status::newFatal( 'gadgets-validate-wrongtype', $property, $validation[1], gettype( $val ) ); |
| 91 | + return Status::newFatal( |
| 92 | + 'gadgets-validate-wrongtype', |
| 93 | + $property, |
| 94 | + $validation[1], |
| 95 | + gettype( $val ) |
| 96 | + ); |
92 | 97 | } |
93 | 98 | |
94 | 99 | if ( isset( $validation[2] ) ) { |
— | — | @@ -95,7 +100,12 @@ |
96 | 101 | $func = $validation[2]; |
97 | 102 | foreach ( $val as $i => $v ) { |
98 | 103 | if ( !$func( $v ) ){ |
99 | | - return Status::newFatal( 'gadgets-validate-wrongtype', "{$property}[{$i}]", $validation[3], gettype( $v ) ); |
| 104 | + return Status::newFatal( |
| 105 | + 'gadgets-validate-wrongtype', |
| 106 | + "{$property}[{$i}]", |
| 107 | + $validation[3], |
| 108 | + gettype( $v ) |
| 109 | + ); |
100 | 110 | } |
101 | 111 | } |
102 | 112 | } |