Index: trunk/phase3/includes/api/ApiFormatYaml_spyc.php |
— | — | @@ -424,14 +424,14 @@ |
425 | 425 | |
426 | 426 | if (is_int($key)) { |
427 | 427 | // It's a sequence |
428 | | - if ($value) |
| 428 | + if ($value !== '' && !is_null($value)) |
429 | 429 | $string = $spaces.'- '.$value."\n"; |
430 | 430 | else |
431 | 431 | $string = $spaces . "-\n"; |
432 | 432 | } else { |
433 | 433 | // It's mapped |
434 | | - if ($value) |
435 | | - $string = $spaces.$key.': '.$value."\n"; |
| 434 | + if ($value !== '' && !is_null($value)) |
| 435 | + $string = $spaces . $key . ': ' . $value . "\n"; |
436 | 436 | else |
437 | 437 | $string = $spaces . $key . ":\n"; |
438 | 438 | } |
— | — | @@ -589,7 +589,7 @@ |
590 | 590 | $array = $array + $this->_toType($v); |
591 | 591 | } |
592 | 592 | $value = $array; |
593 | | - } elseif (strtolower($value) == 'null' or $value == '' or $value == '~') { |
| 593 | + } elseif (strtolower($value) == 'null' or $value === '' or $value == '~') { |
594 | 594 | $value = NULL; |
595 | 595 | } elseif (ctype_digit($value)) { |
596 | 596 | $value = (int)$value; |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -208,8 +208,9 @@ |
209 | 209 | * Database replication lag doesn't cause all action=edit requests to return the |
210 | 210 | nochange flag any more |
211 | 211 | * (bug 15392) ApiFormatBase::formatHTML now uses $wgUrlProtocols. |
212 | | -* (bug 15444) action=edit returned "Unknown error: ``AS_END''" where it should |
| 212 | +* (bug 15444) action=edit returns "Unknown error: ``AS_END''" where it should |
213 | 213 | return just "Unknown error" |
| 214 | +* (bug 15448) YAML output returns empty values instead of 0 |
214 | 215 | |
215 | 216 | === Languages updated in 1.14 === |
216 | 217 | |