Edujugon / PushNotification

PHP and Laravel Package to send push notifications to Android and IOS devices.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

array_key_exists() expects parameter 2 to be array, null given

mirazzaq opened this issue · comments

I am getting the following error while creating object, I can not trace why this error is generating.

screenshot 2019-01-25 at 2 43 03 pm

{
    if (function_exists('config_path') &&
        file_exists(config_path('pushnotification.php')) &&
        function_exists('app')
    ) {
        $configuration = app('config')->get('pushnotification');
    } else {
        $configuration = include(__DIR__ . '/Config/config.php');
    }
    if (!array_key_exists($service, $configuration)) {
        throw new PushNotificationException("Service '$service' missed in config/pushnotification.php");
    }
    return $configuration[$service];
}

/**
 * Initialize the feedback array
 * @return array
 */
protected function initializeFeedback()
{

"array_key_exists() expects parameter 2 to be array, null given"

Hi @mirazzaq ,

Did you run the following command:

php artisan vendor:publish --provider="Edujugon\PushNotification\Providers\PushNotificationServiceProvider" --tag="config"

The issue happen when I run this command.

Though I have library files from another of my project and is now working properly.

So you sorted out the problem, right?

Should we just close this issue then?

Yes please close it.

Please tell how to resolve this issue ?

@mirazzaq I also facing the same issue. I use this library in other project it worked fine but it create this error how to resolve this issue Please tell