Fix r78970 per CR: params were the wrong way around
[lhc/web/wiklou.git] / includes / GlobalFunctions.php
index 04b0e6b..cf0c4b6 100644 (file)
@@ -1287,10 +1287,11 @@ function wfTime() {
 /**
  * Sets dest to source and returns the original value of dest
  * If source is NULL, it just returns the value, it doesn't set the variable
+ * If force is true, it will set the value even if source is NULL
  */
-function wfSetVar( &$dest, $source ) {
+function wfSetVar( &$dest, $source, $force = false ) {
        $temp = $dest;
-       if ( !is_null( $source ) ) {
+       if ( !is_null( $source ) || $force ) {
                $dest = $source;
        }
        return $temp;