Page MenuHomeIn-Portal Phabricator

D130.diff
No OneTemporary

File Metadata

Created
Mon, Jan 6, 5:14 AM

D130.diff

Index: branches/5.2.x/core/kernel/utility/formatters/formatter.php
===================================================================
--- branches/5.2.x/core/kernel/utility/formatters/formatter.php
+++ branches/5.2.x/core/kernel/utility/formatters/formatter.php
@@ -181,7 +181,8 @@
if ( isset($options['cut_zeros']) && $options['cut_zeros'] ) {
// Remove trailing zeros in decimal part (including "." if any left at the end).
- $value = rtrim(preg_replace('/\.([1-9]*)[0]+$/', '.$1', $value), '.');
+ $value = preg_replace('/\.0+$/', '', $value);
+ $value = preg_replace('/(\.\d+?)0+$/', '$1', $value);
}
}

Event Timeline