fix #8131 - chinese translations
[Pman.Core] / DataObjects / Core_email.php
index c38930d..02ce342 100644 (file)
@@ -74,7 +74,7 @@ class Pman_Core_DataObjects_Core_email extends DB_DataObject
         $i->ontable = $this->tableName();
         $i->find();
         while ($i->fetch()){
-            $i->beforeDelete();
+            $i->beforeDelete(array(), $roo);
             $i->delete();
         }
     }
@@ -294,7 +294,7 @@ class Pman_Core_DataObjects_Core_email extends DB_DataObject
                 $html->item(0)->appendChild($element);
             }
             
-            $this->plaintext = str_replace("{unsubscribe_link}", $unsubscribe, $this->plaintext);
+            $this->plaintext = str_replace("{unsubscribe_link}", $unsubscribe, empty($this->plaintext) ? '' : $this->plaintext);
         }