FMElfinderBundle
FMElfinderBundle copied to clipboard
Argument #5 ($result) must be of type array, null given
Describe the bug
FM\\ElfinderBundle\\Event\\ElFinderPostExecutionEvent::__construct(): Argument #5 ($result) must be of type array, null given, called in /var/www/html/vendor/helios-ag/fm-elfinder-bundle/src/Controller/ElFinderController.php on line 218
This is where the error happens:
https://github.com/helios-ag/FMElfinderBundle/blob/main/src/Controller/ElFinderController.php#L216-L218
The load method returns void (null) when cors_support is disabled:
https://github.com/helios-ag/FMElfinderBundle/blob/main/src/Loader/ElFinderLoader.php#L98
I don't get why is this coming up now when the code around this is 8 years old.
The event requires the 5th param to be type of array:
https://github.com/helios-ag/FMElfinderBundle/blob/main/src/Event/ElFinderPostExecutionEvent.php#L23
To Reproduce Load the ElFinder without the cors_support
(OPTIONAL) Additional context So I'm turning the cors_support ON as a way around this for now. I don't get how come it worked up till now. Perhaps PHP version upgrade made this visible.
Hey, this is error 500. In 2 ways :)
Hello, same error
Hey, the shame error here. How set CORS_SUPPORT ON?... thanks!
I have downgrade to the previous version to slove this.
Here is the doc about the cors_support: https://github.com/helios-ag/FMElfinderBundle/blob/main/docs/cors-support.md
Aquí está el documento sobre cors_support: https://github.com/helios-ag/FMElfinderBundle/blob/main/docs/cors-support.md
Thank you!
I have new error:
php.CRITICAL: Uncaught Error: set_time_limit(): Argument #1 ($seconds) must be of type int, string given {"exception":"[object] (TypeError(code: 0): set_time_limit():
Anyone know to solve?
@Luvelnet, @escopecz, @ColonelMoutarde tagged new version, hope it helps, I believe it was due to declare(strict_types=1) which spread downs its restrictions to elfinder lib itself