summaryrefslogtreecommitdiff
path: root/includes/GlobalFunctions.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/GlobalFunctions.php')
-rw-r--r--includes/GlobalFunctions.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index 240cb97b..45cd7ea5 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -3342,7 +3342,7 @@ function wfBaseConvert( $input, $sourceBase, $destBase, $pad = 1,
// Removing leading zeros works around broken base detection code in
// some PHP versions (see <https://bugs.php.net/bug.php?id=50175> and
// <https://bugs.php.net/bug.php?id=55398>).
- $result = gmp_strval( gmp_init( ltrim( $input, '0' ), $sourceBase ), $destBase );
+ $result = gmp_strval( gmp_init( ltrim( $input, '0' ) ?: '0', $sourceBase ), $destBase );
} elseif ( extension_loaded( 'bcmath' ) && ( $engine == 'auto' || $engine == 'bcmath' ) ) {
$decimal = '0';
foreach ( str_split( strtolower( $input ) ) as $char ) {