GoogleTranslate.php
authorChris <chris@roojs.com>
Wed, 2 Apr 2014 13:07:22 +0000 (21:07 +0800)
committerChris <chris@roojs.com>
Wed, 2 Apr 2014 13:07:22 +0000 (21:07 +0800)
GoogleTranslate.php

index 0dcdc8d..cbd6755 100644 (file)
@@ -31,7 +31,9 @@ class Pman_Core_GoogleTranslate extends Pman
         if (empty($pc['googlekey'])) {
             $this->jerr("Google API Key not configured");
         }
-        
+        if (!strlen(trim($_REQUEST['text']))) {
+            $this->jok("");
+        }
         $param = array(
             'key' => $pc['googlekey'],
             'q' => rawurlencode($_REQUEST['text']),