diff --git a/htdocs/api/class/api_documents.class.php b/htdocs/api/class/api_documents.class.php index 40eea243b8c..766841c5bfa 100644 --- a/htdocs/api/class/api_documents.class.php +++ b/htdocs/api/class/api_documents.class.php @@ -615,6 +615,7 @@ class Documents extends DolibarrApi $filearraytmp = dol_dir_list($upload_dir, $type, $recursive, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ? SORT_DESC : SORT_ASC), 1); $filearray = $filearraytmp; // We store answer into an array that we will extends with ecm data + /** @var $filearray array */ $countarray = count($filearray); $filearray = array_slice($filearray, $limit * $page, $limit); if (empty($filearray)) {