Changeset:
7ade092c8e6a
https://sourceforge.net/p/mrbs/hg-code/ci/7ade092c8e6a0b4edfaa04a5ab20f70961f9d69d
Author:
Campbell Morrison <[email protected]>
Date:
Sat Oct 22 10:28:53 2016 +0100
Log message:
Set the MRBS server variables to null if they don't exist in order to avoid
undefined variable errors later
diffstat:
web/grab_globals.inc.php | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
diffs (16 lines):
diff -r 3bb3e398e659 -r 7ade092c8e6a web/grab_globals.inc.php
--- a/web/grab_globals.inc.php Sat Oct 22 10:23:53 2016 +0100
+++ b/web/grab_globals.inc.php Sat Oct 22 10:28:53 2016 +0100
@@ -126,10 +126,8 @@
foreach ($vars as $var)
{
- if (!empty($_SERVER) && isset($_SERVER[$var]))
- {
- $$var = $_SERVER[$var];
- }
+ // Set the variable to null if it doesn't exist to avoid undefined variable
errors
+ $$var = (!empty($_SERVER) && isset($_SERVER[$var])) ? $_SERVER[$var] : null;
}
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits