浏览代码

Fixed bug in readShortMailboxName() if "needle" (delimiter) is empty.

pallo 24 年之前
父节点
当前提交
d05b70622e
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      functions/strings.php

+ 1 - 0
functions/strings.php

@@ -15,6 +15,7 @@
    //    of the $haystack is reached.  $needle is a single character
    //*************************************************************************
    function readShortMailboxName($haystack, $needle) {
+      if ($needle == "") return $haystack;
       if ($needle == ".") $needle = "\.";
       ereg("([^$needle]+)$needle?$", $haystack, $regs);
       return $regs[1];