- Translate plugin: prevent PHP notice when viewing empty message.
authorkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 19 Oct 2006 11:46:25 +0000 (11:46 +0000)
committerkink <kink@7612ce4b-ef26-0410-bec9-ea0150e637f0>
Thu, 19 Oct 2006 11:46:25 +0000 (11:46 +0000)
git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@11926 7612ce4b-ef26-0410-bec9-ea0150e637f0

plugins/translate/functions.php

index 0d22c64cf35a326951d34540a5575bcb6d8799ee..7f2c6458bb4a2afdaa4ec3b1582f45cc4781c9ff 100644 (file)
@@ -93,7 +93,7 @@ function translate_read_form_function() {
     $trans_ar = $message->findDisplayEntity(array(), array('text/plain'));
     $body = '';
     $final_body = '';
-    if ($trans_ar[0] != '') {
+    if ( !empty($trans_ar[0]) ) {
         for ($i = 0; $i < count($trans_ar); $i++) {
             /* reduced version of formatBody and translateText functions */