summaryrefslogtreecommitdiff
path: root/includes/GlobalFunctions.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2015-10-18 09:31:31 +0200
committerPierre Schmitz <pierre@archlinux.de>2015-10-18 09:31:31 +0200
commit80f7dc77d430774192b929d780f96260066df2ee (patch)
tree102eaae7fc9ec567f2af76e96da3de2d1e83afcf /includes/GlobalFunctions.php
parentcccd7bb4d819334c07e0dadaf16cbfdef31880e1 (diff)
Update to MediaWiki 1.25.3
Diffstat (limited to 'includes/GlobalFunctions.php')
-rw-r--r--includes/GlobalFunctions.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php
index 45cd7ea5..ab3f019f 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -3860,12 +3860,13 @@ function wfMemoryLimit() {
* Converts shorthand byte notation to integer form
*
* @param string $string
+ * @param int $default Returned if $string is empty
* @return int
*/
-function wfShorthandToInteger( $string = '' ) {
+function wfShorthandToInteger( $string = '', $default = -1 ) {
$string = trim( $string );
if ( $string === '' ) {
- return -1;
+ return $default;
}
$last = $string[strlen( $string ) - 1];
$val = intval( $string );