Przeglądaj źródła

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

pallo 24 lat temu
rodzic
commit
d05b70622e
1 zmienionych plików z 1 dodań i 0 usunięć
  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
    //    of the $haystack is reached.  $needle is a single character
    //*************************************************************************
    //*************************************************************************
    function readShortMailboxName($haystack, $needle) {
    function readShortMailboxName($haystack, $needle) {
+      if ($needle == "") return $haystack;
       if ($needle == ".") $needle = "\.";
       if ($needle == ".") $needle = "\.";
       ereg("([^$needle]+)$needle?$", $haystack, $regs);
       ereg("([^$needle]+)$needle?$", $haystack, $regs);
       return $regs[1];
       return $regs[1];