Uploaded image for project: 'phpBB3'
  1. phpBB3
  2. PHPBB3-12754

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

    XMLWordPrintable

Details

    • Improvement
    • Status: Closed (View Workflow)
    • Minor
    • Resolution: Invalid
    • 3.1.0-b4
    • 3.1.0-RC3
    • 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

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: