Browse Source

Default was overriding legitimate values in sqgetGlobalVar due to recent addition of typecast logic

pdontthink 19 years ago
parent
commit
118b2a9ce8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      functions/global.php

+ 1 - 1
functions/global.php

@@ -209,7 +209,7 @@ function sqgetGlobalVar($name, &$value, $search = SQ_INORDER, $default = NULL, $
             case SQ_TYPE_BOOL: $value = (bool) $value; break;
             default: break;
         }
-    } else if (!is_null($default)) {
+    } else if (!$result && !is_null($default)) {
         $value = $default;
     }
     return $result;