From 82a73e219c083aac5c5d855a39440f3c15790793 Mon Sep 17 00:00:00 2001 From: Tiago Alves Date: Thu, 20 Sep 2018 13:54:50 +0100 Subject: [PATCH] Fix getAppVersion() Fixes a `Too few arguments to function array_first()` error. In Lumen 5.1.7, `array_first` requires 2 arguments. --- src/Notifications/NotificationServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Notifications/NotificationServiceProvider.php b/src/Notifications/NotificationServiceProvider.php index 1c5cba7..6bdbadb 100644 --- a/src/Notifications/NotificationServiceProvider.php +++ b/src/Notifications/NotificationServiceProvider.php @@ -80,7 +80,7 @@ private function getAppVersion() { $version = $this->app->version(); if (substr($version, 0, 7) === 'Lumen (') { - $version = array_first(explode(')', str_replace('Lumen (', '', $version))); + $version = head(explode(')', str_replace('Lumen (', '', $version))); } return $version; }