浏览代码

Add notes about issue reported where unset() breaks when removing attachments

pdontthink 16 年之前
父节点
当前提交
db50a94930
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/compose.php

+ 2 - 0
src/compose.php

@@ -659,6 +659,8 @@ elseif (isset($sigappend)) {
         foreach($delete as $index) {
             if (!empty($composeMessage->entities) && isset($composeMessage->entities[$index])) {
                 $composeMessage->entities[$index]->purgeAttachments();
+                // FIXME: one person reported that unset() didn't do anything at all here, so this is a work-around... but it triggers PHP notices if the unset() doesn't work, which should be fixed... but bigger question is if unset() doesn't work here, what about everywhere else? Anyway, uncomment this if you think you need it
+                //$composeMessage->entities[$index] = NULL;
                 unset ($composeMessage->entities[$index]);
             }
         }