changeset 98:94b573fd7c8c gmap2

Move variable existence check before creation of XML document.
author Matti Hamalainen <ccr@tnsp.org>
date Sun, 16 Oct 2011 03:30:21 +0300
parents 0b5fc283ed0c
children 050adb004b98
files tools/makegmaps.php
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/tools/makegmaps.php	Sun Oct 16 03:29:55 2011 +0300
+++ b/tools/makegmaps.php	Sun Oct 16 03:30:21 2011 +0300
@@ -389,13 +389,13 @@
 /* Export tradelane line data
  */
 echo "\nCreating tradelane line data '".$tradelaneOver."' ...\n";
+if (!isset($tradelaneDefs))
+  die("PHP array \$tradelaneDefs not set, '$config' is old or incompatible.\n");
+
 $doc = new DOMDocument("1.0", "UTF-8");
 $node = $doc->createElement("tradelanes");
 $parnode = $doc->appendChild($node);
 
-if (!isset($tradelaneDefs))
-  die("PHP array \$tradelaneDefs not set, '$config' is old or incompatible.\n");
-
 foreach ($tradelaneDefs as $index => $points)
 {
   $node = $doc->createElement("line");