0

Im use T-dah Webmail, yes i know its very old and i try to rewrite it. Im am stuck in Fatal error: Allowed memory size of 134217728 bytes exhausted in inc/class/class.uebimiau.php on line 975

975 its function:

function fix_prefix($folder,$add = 0) {
    if(     $this->mail_protocol == "imap" &&
            !preg_match("/^inbox$/i",$folder) && 
            $this->mail_prefix && 
            !preg_match("/^_/",$folder)) {

        if($add) {
            if(!preg_match('/^'.preg_quote($this->mail_prefix).'/',$folder)) 
                return $this->mail_prefix.$folder;
            else
                return $folder;
        } else return preg_replace("/^".preg_quote($this->mail_prefix)."/","",$folder);
    } else return $folder;
}

Problem in preg_match, any ideas?

  • You can reduce one of those `preg_match`s by doing `!preg_match("/^(_|inbox$)/i",$folder)` not sure where your memory is going though. You should do some logging or use a debugger. – user3783243 Jan 22 '19 at 20:27
  • Possible duplicate of [Allowed memory size of 33554432 bytes exhausted (tried to allocate 43148176 bytes) in php](https://stackoverflow.com/questions/415801/allowed-memory-size-of-33554432-bytes-exhausted-tried-to-allocate-43148176-byte) – Brandon Haugen Jan 22 '19 at 20:30

0 Answers0