codedge / laravel-selfupdater

This package provides some basic methods to implement a self updating functionality for your Laravel application. Already bundled are some methods to provide a self-update mechanism via Github or some private repository via http.
MIT License
394 stars 80 forks source link

Updater evaluating bool instead of string. #232

Open turbo124 opened 3 years ago

turbo124 commented 3 years ago

We've been using the self-updater for quite a while and things are working perfectly. Recently we've seen the following error

[2021-08-02 21:17:29] production.ERROR: strlen() expects parameter 1 to be string, bool given {“userId”:1,“exception”:"[object] (TypeError(code: 0): strlen() expects parameter 1 to be string, bool given at /invoice/vendor/codedge/laravel-selfupdater/src/Models/UpdateExecutor.php:101) [stacktrace]


        $sorted->each(function (SplFileInfo $directory) {
            if (! dirsIntersect(File::directories($directory->getRealPath()), config('self-update.exclude_folders'))) {
                File::copyDirectory(
                    $directory->getRealPath(),
                    Str::finish($this->basePath, DIRECTORY_SEPARATOR).Str::finish($directory->getRelativePath(), DIRECTORY_SEPARATOR).$directory->getBasename()
                );
            }

Any ideas of what could possibly be the cause?

codedge commented 3 years ago

Adhoc no idea. The error occurs in line 101 when passing a bool to the strlen() function. Not sure why this happens.

Some more infos maybe: