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

Laravel 6: Call to undefined function Jstoone\Mailman\array_first() #26

Open
4n70w4 opened this issue Dec 19, 2019 · 1 comment
Open

Comments

@4n70w4
Copy link

4n70w4 commented Dec 19, 2019

Symfony\Component\Debug\Exception\FatalThrowableError: Call to undefined function Jstoone\Mailman\array_first()

/var/www/app/vendor/jstoone/nova-mailman/src/DeliverToInbox.php:91
/var/www/app/vendor/jstoone/nova-mailman/src/DeliverToInbox.php:83
/var/www/app/vendor/jstoone/nova-mailman/src/DeliverToInbox.php:41
/var/www/app/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php:366
/var/www/app/vendor/laravel/framework/src/Illuminate/Events/Dispatcher.php:196
/var/www/app/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php:519
/var/www/app/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php:261
/var/www/app/vendor/laravel/framework/src/Illuminate/Mail/Mailable.php:159
/var/www/app/vendor/laravel/framework/src/Illuminate/Support/Traits/Localizable.php:19
/var/www/app/vendor/laravel/framework/src/Illuminate/Mail/Mailable.php:160
/var/www/app/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php:275
/var/www/app/vendor/laravel/framework/src/Illuminate/Mail/Mailer.php:229
/var/www/app/vendor/laravel/framework/src/Illuminate/Mail/PendingMail.php:127
@4n70w4
Copy link
Author

4n70w4 commented Dec 19, 2019

@package jstoone/nova-mailman

Index: src/DeliverToInbox.php
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- src/DeliverToInbox.php	(date 1576755583296)
+++ src/DeliverToInbox.php	(date 1576755583296)
@@ -4,6 +4,7 @@

 use Illuminate\Contracts\Filesystem\Filesystem;
 use Illuminate\Mail\Events\MessageSent;
+use Illuminate\Support\Arr;
 use Swift_Message;

 class DeliverToInbox
@@ -88,7 +89,7 @@
     {
         return json_encode([
             'id'        => $this->identifier,
-            'recipient' => array_first(array_keys($message->getTo())),
+            'recipient' => Arr::first(array_keys($message->getTo())),
             'subject'   => $message->getSubject(),
             'sent_at'   => (string) now(),
             'link'      => route('nova-mailman.show', $this->identifier),

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