From a056e285c21ba76e900f354910a187a0eef6631a Mon Sep 17 00:00:00 2001
From: Phy <git@phy25.com>
Date: Wed, 23 Aug 2017 21:40:35 +0800
Subject: [PATCH] Fix rendering null $language going to GeSHi (fixes #2088)

---
 inc/parser/xhtml.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/inc/parser/xhtml.php b/inc/parser/xhtml.php
index 8d2a623b1..f16cb6426 100644
--- a/inc/parser/xhtml.php
+++ b/inc/parser/xhtml.php
@@ -651,7 +651,7 @@ class Doku_Renderer_xhtml extends Doku_Renderer {
             $text = substr($text, 0, -1);
         }
 
-        if(is_null($language)) {
+        if(empty($language)) { // empty is faster than is_null and can prevent '' string
             $this->doc .= '<pre class="'.$type.'">'.$this->_xmlEntities($text).'</pre>'.DOKU_LF;
         } else {
             $class = 'code'; //we always need the code class to make the syntax highlighting apply
-- 
GitLab