codedge/laravel-selfupdater

Updater evaluating bool instead of string.

turbo124 opened this issue · 1 comments

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?

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:

  • Fresh IN installation?
  • PHP version?