* FIX warning error on no language is chosen ('clear' button pressed)
authormitty <mitty@7d2118f6-f56c-43e7-95a2-4bb3031d96e7>
Wed, 27 Oct 2010 06:15:15 +0000 (06:15 +0000)
committermitty <mitty@7d2118f6-f56c-43e7-95a2-4bb3031d96e7>
Wed, 27 Oct 2010 06:15:15 +0000 (06:15 +0000)
git-svn-id: https://lab.mitty.jp/svn/lab/trunk@77 7d2118f6-f56c-43e7-95a2-4bb3031d96e7

genshi/index.php

index 7817396..e73d21d 100755 (executable)
@@ -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';