laravel-selfupdater icon indicating copy to clipboard operation
laravel-selfupdater copied to clipboard

Updater evaluating bool instead of string.

Open turbo124 opened this issue 4 years ago • 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?

turbo124 avatar Aug 03 '21 07:08 turbo124

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?

codedge avatar Aug 04 '21 12:08 codedge