Browse Source

in sqgetGlobalVar, reset $value if it is not found.

Thijs Kinkhorst 20 năm trước cách đây
mục cha
commit
5146a1489d
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      functions/global.php

+ 3 - 1
functions/global.php

@@ -237,6 +237,8 @@ function sqgetGlobalVar($name, &$value, $search = SQ_INORDER) {
         }
         break;
     }
+    /* Nothing found, reset $value and return FALSE */
+    $value = null;
     return FALSE;
 }
 
@@ -287,4 +289,4 @@ function sqsession_is_active() {
 }
 
 // vim: et ts=4
-?>
+?>