]> git.mjollnir.org Git - moodle.git/commitdiff
Robustness on an optional variable
authormoodler <moodler>
Sun, 21 Sep 2003 16:35:49 +0000 (16:35 +0000)
committermoodler <moodler>
Sun, 21 Sep 2003 16:35:49 +0000 (16:35 +0000)
lib/weblib.php

index 02f0873cb3ab4fed1d27c212a947b2a732bc642d..f0258fb508c2c7a12ea8f8a706c89968f8f17f94 100644 (file)
@@ -788,8 +788,9 @@ function print_header ($title="", $heading="", $navigation="", $focus="", $meta=
             }
         }
         echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1";
-        if ($CFG->xml_doctype_extra)
+        if (!empty($CFG->xml_doctype_extra)) {
             echo " plus $CFG->xml_doctype_extra";
+        }
         echo "//" . strtoupper($currentlanguage) . "\" \"$CFG->xml_dtd\">\n";
         $direction = " xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"$currentlanguage\" $direction";
     }