Skip to content

[Bug]: Incorrect index reference in MoveUploadsToNewDisk.php #18550

@JMpixel

Description

@JMpixel

Snipe-IT Version

v8.3.7

PHP Version

8.2.26

Composer Version

2.9.2

MySQL/MariaDB version

MariaDB 11.8.5

How did you install Snipe-IT?

Docker

Is this a fresh install or an upgrade?

Fresh install

What happened?

When running php artisan snipeit:move-uploads, the command fails on private files.

What browsers are you seeing the problem on?

Microsoft Edge

Can you reproduce this on the public demo?

N/A

Do you have full multiple company support enabled?

No

If you have full multiple company support enabled, do you have location scoping to company enabled?

I do not have full multiple company support enabled

Application log output

ErrorException: Undefined array key 19 in /var/www/html/app/Console/Commands/MoveUploadsToNewDisk.php:116 Stack trace: #0 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php(258): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError() #1 /var/www/html/app/Console/Commands/MoveUploadsToNewDisk.php(116): Illuminate\Foundation\Bootstrap\HandleExceptions->Illuminate\Foundation\Bootstrap\{closure}() #2 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(36): App\Console\Commands\MoveUploadsToNewDisk->handle() #3 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Util.php(43): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() #4 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(95): Illuminate\Container\Util::unwrapIfClosure() #5 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(35): Illuminate\Container\BoundMethod::callBoundMethod() #6 /var/www/html/vendor/laravel/framework/src/Illuminate/Container/Container.php(696): Illuminate\Container\BoundMethod::call() #7 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(213): Illuminate\Container\Container->call() #8 /var/www/html/vendor/symfony/console/Command/Command.php(318): Illuminate\Console\Command->execute() #9 /var/www/html/vendor/laravel/framework/src/Illuminate/Console/Command.php(182): Symfony\Component\Console\Command\Command->run() #10 /var/www/html/vendor/symfony/console/Application.php(1110): Illuminate\Console\Command->run() #11 /var/www/html/vendor/symfony/console/Application.php(359): Symfony\Component\Console\Application->doRunCommand() #12 /var/www/html/vendor/symfony/console/Application.php(194): Symfony\Component\Console\Application->doRun() #13 /var/www/html/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(198): Symfony\Component\Console\Application->run() #14 /var/www/html/artisan(33): Illuminate\Foundation\Console\Kernel->handle() #15 {main}

Browser console output

Common Issues

  • I have searched this repo for existing issues related to my issue (including closed issues)
  • My APP_URL is set correctly in my .env file (including http or https and no trailing slash)
  • I have searched the official Snipe-IT documentation and have checked the Common Issues documentation (where applicable)
  • I have run database migrations (where applicable).
  • I have attached screenshots and/or videos of the issue (where applicable)

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions