Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Call to a member function present() on null" Error showing when using the php artisan snipeit:acceptance-reminder command #15951

Open
2 tasks done
SebastianKlimczok opened this issue Dec 11, 2024 · 0 comments

Comments

@SebastianKlimczok
Copy link

Debug mode

Describe the bug

When executing the snipeit:acceptance-reminder command, an error is thrown and the command does not execute.
The SnipeIT System in question was recently updated from v7.0.10 to v7.1.15.

Reproduction steps

  1. Log into SnipeIT via SSH using the SnipeIT User
  2. Execute php /var/www/html/snipeit/artisan snipeit:acceptance-reminder to send the reminders

Expected behavior

When executing the command, acceptance reminders should be sent for all unaccepted assets, and the command should put out a total number of reminders sent.

Screenshots

image

Snipe-IT Version

v7.1.15 build 16052 (g25bfd3e84)

Operating System

Ubuntu Server 24.04 LTS

Web Server

Apache/2.4.58 (Ubuntu)

PHP Version

8.3.14

Operating System

No response

Browser

No response

Version

No response

Device

No response

Operating System

No response

Browser

No response

Version

No response

Error messages

php /var/www/html/snipeit/artisan snipeit:acceptance-reminder

   Error

  Call to a member function present() on null

  at app/Console/Commands/SendAcceptanceReminder.php:75
     71▕             $acceptance = $unacceptedAssetGroup[0]['acceptance'];
     72▕             $locale = $acceptance->assignedTo?->locale;
     73▕             $email = $acceptance->assignedTo?->email;
     74▕             if(!$email){
  ➜  75▕                 $this->info($acceptance->assignedTo->present()->fullName().' has no email address.');
     76▕             }
     77▕             $item_count = $unacceptedAssetGroup->count();
     78▕
     79▕             if ($locale && $email) {

      +12 vendor frames

  13  artisan:33
      Illuminate\Foundation\Console\Kernel::handle()

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant