Explorar o código

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

pdontthink %!s(int64=19) %!d(string=hai) anos
pai
achega
118b2a9ce8
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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;