Index: trunk/phase3/includes/api/ApiQueryUsers.php |
— | — | @@ -145,8 +145,15 @@ |
146 | 146 | } |
147 | 147 | if(isset($this->prop['emailable']) && $user->canReceiveEmail()) |
148 | 148 | $data[$name]['emailable'] = ''; |
149 | | - if(isset($this->prop['gender'])) |
150 | | - $data[$name]['gender'] = $user->getOption( 'gender' ); |
| 149 | + |
| 150 | + if(isset($this->prop['gender'])) { |
| 151 | + $gender = $user->getOption( 'gender' ); |
| 152 | + if ( strval( $gender ) === '' ) { |
| 153 | + $gender = 'unknown'; |
| 154 | + } |
| 155 | + $data[$name]['gender'] = $gender; |
| 156 | + } |
| 157 | + |
151 | 158 | if(!is_null($params['token'])) |
152 | 159 | { |
153 | 160 | $tokenFunctions = $this->getTokenFunctions(); |