Index: trunk/extensions/SemanticResultFormats/BibTeX/SRF_BibTeX.php |
— | — | @@ -164,7 +164,11 @@ |
165 | 165 | } |
166 | 166 | |
167 | 167 | if ( $var !== false ) { |
168 | | - $var = efSRFGetNextDV( $field )->getShortWikiText(); |
| 168 | + $dataValue = efSRFGetNextDV( $field ); |
| 169 | + |
| 170 | + if ( $dataValue !== false ) { |
| 171 | + $var = $dataValue->getShortWikiText(); |
| 172 | + } |
169 | 173 | } |
170 | 174 | else { |
171 | 175 | switch ( $label ) { |
— | — | @@ -177,13 +181,11 @@ |
178 | 182 | $var = $GLOBALS['wgLang']->listToText( $wikiTexts ); |
179 | 183 | break; |
180 | 184 | case 'date': |
181 | | - $value = efSRFGetNextDV( $field ); |
| 185 | + $dataValue = efSRFGetNextDV( $field ); |
182 | 186 | |
183 | | - if ( get_class( $value ) == 'SMWTimeValue' ) { |
184 | | - if ( $value !== false ) { |
185 | | - $year = $value->getYear(); |
186 | | - $month = $value->getMonth(); |
187 | | - } |
| 187 | + if ( $dataValue !== false && get_class( $dataValue ) == 'SMWTimeValue' ) { |
| 188 | + $year = $dataValue->getYear(); |
| 189 | + $month = $dataValue->getMonth(); |
188 | 190 | } |
189 | 191 | break; |
190 | 192 | } |