You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which operating systems have you tested for this bug?
macOS, Linux
Which server did you use?
fpm-fcgi
Database
MariaDB 10.8
What happened?
When I'm trying to create FileCollection object from 2 or more files paths (not directories), passed in the __constructor, only first file is added. Because in FileCollection->add() method uses return $this->addFile($path); instead of $this->addFile($path); that ends the execution of the foreach loop
Steps to Reproduce
$object = new FileCollection(['/path/to/file', '/path/to/other-file']);
Expected Output
An object containing all passed files
Anything else?
No response
The text was updated successfully, but these errors were encountered:
AnakinA1
added
the
bug
Verified issues on the current code behavior or pull requests that will fix them
label
Jul 23, 2022
Hi, yes, but question is that inside docs mentioned that FileCollection allows to work with groups of files and by logic __constructor should provide an opportunity to add as many files/dirs as you want. And the current behavior is blocking the ability to add more than 1 file via the constructor, for no real reason
PHP Version
7.3, 7.4, 8.0, 8.1
CodeIgniter4 Version
4.2.1
CodeIgniter4 Installation Method
Composer (as dependency to an existing project)
Which operating systems have you tested for this bug?
macOS, Linux
Which server did you use?
fpm-fcgi
Database
MariaDB 10.8
What happened?
When I'm trying to create
FileCollection
object from 2 or more files paths (not directories), passed in the__constructor
, only first file is added. Because inFileCollection->add()
method usesreturn $this->addFile($path);
instead of$this->addFile($path);
that ends the execution of theforeach
loopSteps to Reproduce
$object = new FileCollection(['/path/to/file', '/path/to/other-file']);
Expected Output
An object containing all passed files
Anything else?
No response
The text was updated successfully, but these errors were encountered: