mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-28 06:08:52 +00:00
[feature/migrations] Make sure the path sent to load_migrations is a directory
Prevent a lot++ of errors PHPBB3-9737
This commit is contained in:
parent
445667a62e
commit
5f9e1f1e89
1 changed files with 5 additions and 0 deletions
|
@ -139,6 +139,11 @@ class phpbb_db_migrator
|
||||||
*/
|
*/
|
||||||
public function load_migrations($path, $check_fulfillable = true)
|
public function load_migrations($path, $check_fulfillable = true)
|
||||||
{
|
{
|
||||||
|
if (!is_dir($path))
|
||||||
|
{
|
||||||
|
throw new phpbb_db_migration_exception('DIRECTORY INVALID', $path);
|
||||||
|
}
|
||||||
|
|
||||||
$handle = opendir($path);
|
$handle = opendir($path);
|
||||||
while (($file = readdir($handle)) !== false)
|
while (($file = readdir($handle)) !== false)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue