Error when Updating with a custom Module

Hello, I’ve created a custom module with the Laravel Modules Plugin. However, after I updated the app, when I call an endpoint from the module, it gives me this error: file_get_contents(): Argument #1 ($filename) must not contain any null bytes (500 Internal Server Error)

Hi,

There may be more details about the error in storage/logs

There are:

[2024-02-27 07:52:53] development.ERROR: file_get_contents(): Argument #1 ($filename) must not contain any null bytes {"userId":1,"exception":"[object] (ValueError(code: 0): file_get_contents(): Argument #1 ($filename) must not contain>
[stacktrace]
#0 /var/www/html/ninja/vendor/league/flysystem-local/LocalFilesystemAdapter.php(294): file_get_contents()
#1 /var/www/html/ninja/vendor/league/flysystem/src/Filesystem.php(76): League\\Flysystem\\Local\\LocalFilesystemAdapter->read()
#2 /var/www/html/ninja/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemAdapter.php(259): League\\Flysystem\\Filesystem->read()
#3 /var/www/html/ninja/vendor/laravel/framework/src/Illuminate/Filesystem/FilesystemManager.php(438): Illuminate\\Filesystem\\FilesystemAdapter->get()
#4 /var/www/html/ninja/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(355): Illuminate\\Filesystem\\FilesystemManager->__call()
#5 /var/www/html/ninja/Modules/BgNinja/Http/Controllers/InvoicesBgController.php(676): Illuminate\\Support\\Facades\\Facade::__callStatic()
#6 /var/www/html/ninja/vendor/laravel/framework/src/Illuminate/Routing/ResponseFactory.php(160): Modules\\BgNinja\\Http\\Controllers\\InvoicesBgController->Modules\\BgNinja\\Http\\Controllers\\{closure}()
#7 /var/www/html/ninja/vendor/symfony/http-foundation/StreamedResponse.php(106): Illuminate\\Routing\\ResponseFactory->Illuminate\\Routing\\{closure}()
#8 /var/www/html/ninja/vendor/symfony/http-foundation/Response.php(425): Symfony\\Component\\HttpFoundation\\StreamedResponse->sendContent()
#9 /var/www/html/ninja/public/index.php(61): Symfony\\Component\\HttpFoundation\\Response->send()
#10 {main}
"}

Hi,

I’m not sure, you may want to post an issue on GitHub.

1 Like