summaryrefslogtreecommitdiff
path: root/includes/GlobalFunctions.php
diff options
context:
space:
mode:
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 b21779c1..2c35568b 100644
--- a/includes/GlobalFunctions.php
+++ b/includes/GlobalFunctions.php
@@ -1341,10 +1341,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;