From 7895a8226835b09e608a923fe13b5e88f0f7e846 Mon Sep 17 00:00:00 2001 From: Jose Gonzalez Date: Wed, 2 Jun 2021 16:06:00 +0200 Subject: [PATCH] Fixed issue with types --- pandora_console/include/functions_filemanager.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pandora_console/include/functions_filemanager.php b/pandora_console/include/functions_filemanager.php index cc18c6b02d..7fbfc44bd1 100644 --- a/pandora_console/include/functions_filemanager.php +++ b/pandora_console/include/functions_filemanager.php @@ -981,12 +981,12 @@ function filemanager_safe_directory( $directory = io_safe_output($directory); $forbiddenAttempting = false; - if (preg_match('/(\.){1,2}/', $directory) !== false) { + if ((bool) preg_match('/(\.){1,2}/', $directory) !== false) { $directory = preg_replace('/(\.){1,2}/', '', (empty($safedDirectory) === true) ? $directory : $safedDirectory); $forbiddenAttempting = true; } - if (preg_match('/(/\/\)+/', $directory) !== false) { + if ((bool) preg_match('/(/\/\)+/', $directory) !== false) { $directory = preg_replace('/(/\/\)+/', '/', (empty($safedDirectory) === true) ? $directory : $safedDirectory); $forbiddenAttempting = true; }