From: moodler <moodler> Date: Sun, 21 Sep 2003 16:35:49 +0000 (+0000) Subject: Robustness on an optional variable X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=e4576482d5765ee4ea88485d901051ea926a1fc3;p=moodle.git Robustness on an optional variable --- diff --git a/lib/weblib.php b/lib/weblib.php index 02f0873cb3..f0258fb508 100644 --- a/lib/weblib.php +++ b/lib/weblib.php @@ -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"; }