Explorar o código

- Translate plugin: prevent PHP notice when viewing empty message.

Thijs Kinkhorst %!s(int64=19) %!d(string=hai) anos
pai
achega
2d862776c5
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      plugins/translate/functions.php

+ 1 - 1
plugins/translate/functions.php

@@ -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 */