Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-10602

A bug in mail queue processing

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.0.12-RC1, 3.1.0-a1
    • 3.0.10
    • Other
    • None
    • php 5.2.17, mysql 5.5.18, firefox 9.0.1

      We've installed 3.0.10 a couple of days ago and found that our emails are not being sent. After some investigation I found something that looks like a bug.
      File includes/functions_messenger.php, line 720:

      if (!file_exists($this->cache_file) || filemtime($this->cache_file) > time() - $config['queue_interval'])
      

      I believe it should be

      if (!file_exists($this->cache_file))
      

      as

      || filemtime($this->cache_file) > time() - $config['queue_interval']) 
      

      is a leftover from a stale lock check from old locking system, which used to be

      if (!file_exists($this->cache_file) || (file_exists($this->cache_file . '.lock') && filemtime($this->cache_file) > time() - $config['queue_interval']))
      

      and which used to work correctly due to && operator having higher precedence over || operator.

            Oleg Oleg [X] (Inactive)
            deldel deldel
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: