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

found a bug in phpbb_require_updated() function inside install/index.php

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Invalid
    • Icon: Minor Minor
    • 3.1.0-RC3
    • 3.1.0-b4
    • Installation system
    • None
    • php version - PHP 5.5.9-1ubuntu4 (cli) (built: Apr 9 2014 17:11:57)
      database MYSQL - Server version: 5.5.37-0ubuntu0.14.04.1 (Ubuntu)
      Operating System - Ubuntu 14.04

      In function phpbb_require_updated() we have too parameters $path, $optional = false, and when new path is not available we try looking for file in old path and it has

      if (file_exists($new_path))
      	{
      		require($new_path);
      	}
      	else if (!$optional || file_exists($old_path))
      	{
      		require($old_path);
      	}

      it should rather be like this

      if (file_exists($new_path))
      	{
      		require($new_path);
      	}
      	else if (!$optional && file_exists($old_path))
      	{
      		require($old_path);
      	}

      NOTE the && in else if (!$optional && file_exists($old_path))
      this would prevent from error if file is not found.

            nickvergessen Joas Schilling
            garvitdelhi garvitdelhi [X] (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: