From: mitty <mitty@7d2118f6-f56c-43e7-95a2-4bb3031d96e7>
Date: Wed, 27 Oct 2010 06:15:15 +0000 (+0000)
Subject:  * FIX warning error on no language is chosen ('clear' button pressed)
X-Git-Tag: r89-trunk~13
X-Git-Url: http://lab.mitty.jp/git/?a=commitdiff_plain;h=18050d88638760fe82515afde470994c5f569e48;p=lab.git

 * FIX warning error on no language is chosen ('clear' button pressed)

git-svn-id: https://lab.mitty.jp/svn/lab/trunk@77 7d2118f6-f56c-43e7-95a2-4bb3031d96e7
---

diff --git a/genshi/index.php b/genshi/index.php
index 7817396..e73d21d 100755
--- a/genshi/index.php
+++ b/genshi/index.php
@@ -30,6 +30,7 @@ if (isset($_POST['submit'])) {
         $_POST['source'] = stripslashes($_POST['source']);
     }
     if (!strlen(trim($_POST['source']))) {
+        if(! isset($_POST['language'])) { $_POST['language'] = 'php'; }
         $_POST['language'] = preg_replace('#[^a-zA-Z0-9\-_]#', '', $_POST['language']);
         $_POST['source'] = implode('', @file($path . 'geshi/' . $_POST['language'] . '.php'));
         $_POST['language'] = 'php';