From a94a46578f6b12ab55b41443653cc24329fb704d Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 7 Oct 2021 18:30:59 +0200 Subject: [PATCH] fix PHP 8.0 "TypeError: count(): Argument #1 ($value) must be of type Countable|array, string given" when creating a new directory --- filemanager/inc/class.filemanager_ui.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/filemanager/inc/class.filemanager_ui.inc.php b/filemanager/inc/class.filemanager_ui.inc.php index df5ca6eca1..c8eb9bda2d 100644 --- a/filemanager/inc/class.filemanager_ui.inc.php +++ b/filemanager/inc/class.filemanager_ui.inc.php @@ -684,7 +684,7 @@ class filemanager_ui */ static public function action($action,$selected,$dir=null,&$errs=null,&$files=null,&$dirs=null) { - if (!count($selected)) + if (!count((array)$selected)) { return lang('You need to select some files first!'); }