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