* PHP 4.1.2 compatibility fix: define floatval() equivalent if missing
authorBrion Vibber <brion@users.mediawiki.org>
Sat, 16 Jul 2005 06:31:46 +0000 (06:31 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Sat, 16 Jul 2005 06:31:46 +0000 (06:31 +0000)
This triggered if the 'days' option in Special:Watchlist was selected

RELEASE-NOTES
includes/GlobalFunctions.php

index 5147e1b..f94aecf 100644 (file)
@@ -578,6 +578,7 @@ of MediaWiki:Newpagetext) to &action=edit, if page is new.
 * Undo inconsistent editing behavior change
 * (bug 2835) Back out fix for bug 2802, caused regressions in category sort
 * (bug 2866) Revert experimental, non-cross-platform sortable table hack
+* PHP 4.1.2 compatibility fix: define floatval() equivalent if missing
 
 
 === Caveats ===
index 939c9ea..07e7750 100644 (file)
@@ -79,6 +79,17 @@ if ( !function_exists( 'mb_substr' ) ) {
        }
 }
 
+if( !function_exists( 'floatval' ) ) {
+       /**
+        * First defined in PHP 4.2.0
+        * @param mixed $var;
+        * @return float
+        */
+       function floatval( $var ) {
+               return (float)$var;
+       }
+}
+
 /**
  * Where as we got a random seed
  * @var bool $wgTotalViews