Error

We're sorry, but an unhandled error occurred. Please see the details below.

Trying to get property 'name' of non-object

C:\home\site\wwwroot/themes/register-now/layouts/event.htm line 31

        curl_close($ch);
 
        //convert json to PHP array for further process
        $api_response_arr = json_decode($api_response_json);
        // var_dump($api_response_json);
 
        $this['title'] = !empty($api_response_arr) ? $api_response_arr->data->name : '';
        $this['description'] = !empty($api_response_arr) ? $api_response_arr->data->short_description : '';
        $this['startdate'] = !empty($api_response_arr) ? $api_response_arr->data->start_date :  '';
        $this['enddate'] = !empty($api_response_arr) ? $api_response_arr->data->end_date :  '';
        $this['locationname'] = !empty($api_response_arr) ? $api_response_arr->data->location->name :  '';
        $this['streetaddress'] = !empty($api_response_arr) ? $api_response_arr->data->location->street_address :  '';
        $this['addresslocality'] = !empty($api_response_arr) ? $api_response_arr->data->location->locality :  '';

Stack trace

# Called Code Document Line
42 Cms645994bb17a2d829755293_82e2382978797d2f897c748f11919a9dClass->onInit() ~/modules/cms/classes/Controller.php 342
41 Cms\Classes\Controller->runPage() ~/modules/cms/classes/Controller.php 225
40 Cms\Classes\Controller->run() ~/modules/cms/classes/CmsController.php 50
39 Cms\Classes\CmsController->run()
38 call_user_func_array() ~/vendor/laravel/framework/src/Illuminate/Routing/Controller.php 54
37 Illuminate\Routing\Controller->callAction() ~/vendor/laravel/framework/src/Illuminate/Routing/ControllerDispatcher.php 45
36 Illuminate\Routing\ControllerDispatcher->dispatch() ~/vendor/laravel/framework/src/Illuminate/Routing/Route.php 212
35 Illuminate\Routing\Route->runController() ~/vendor/laravel/framework/src/Illuminate/Routing/Route.php 169
34 Illuminate\Routing\Route->run() ~/vendor/laravel/framework/src/Illuminate/Routing/Router.php 658
33 Illuminate\Routing\Router->Illuminate\Routing\{closure}() ~/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php 30
32 Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}() ~/vendor/laravel/framework/src/Illuminate/Routing/Middleware/SubstituteBindings.php 41
31 Illuminate\Routing\Middleware\SubstituteBindings->handle() ~/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php 149
30 Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() ~/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php 53
29 Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}() ~/vendor/laravel/framework/src/Illuminate/View/Middleware/ShareErrorsFromSession.php 49
28 Illuminate\View\Middleware\ShareErrorsFromSession->handle() ~/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php 149
27 Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() ~/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php 53
26 Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}() ~/vendor/laravel/framework/src/Illuminate/Session/Middleware/StartSession.php 63
25 Illuminate\Session\Middleware\StartSession->handle() ~/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php 149
24 Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() ~/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php 53
23 Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}() ~/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/AddQueuedCookiesToResponse.php 37
22 Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse->handle() ~/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php 149
21 Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() ~/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php 53
20 Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}() ~/vendor/laravel/framework/src/Illuminate/Cookie/Middleware/EncryptCookies.php 68
19 Illuminate\Cookie\Middleware\EncryptCookies->handle() ~/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php 149
18 Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() ~/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php 53
17 Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}() ~/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php 102
16 Illuminate\Pipeline\Pipeline->then() ~/vendor/laravel/framework/src/Illuminate/Routing/Router.php 660
15 Illuminate\Routing\Router->runRouteWithinStack() ~/vendor/laravel/framework/src/Illuminate/Routing/Router.php 635
14 Illuminate\Routing\Router->runRoute() ~/vendor/laravel/framework/src/Illuminate/Routing/Router.php 601
13 Illuminate\Routing\Router->dispatchToRoute() ~/vendor/october/rain/src/Router/CoreRouter.php 20
12 October\Rain\Router\CoreRouter->dispatch() ~/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php 176
11 Illuminate\Foundation\Http\Kernel->Illuminate\Foundation\Http\{closure}() ~/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php 30
10 Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}() ~/vendor/laravel/framework/src/Illuminate/Foundation/Http/Middleware/CheckForMaintenanceMode.php 46
9 Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode->handle() ~/vendor/october/rain/src/Foundation/Http/Middleware/CheckForMaintenanceMode.php 25
8 October\Rain\Foundation\Http\Middleware\CheckForMaintenanceMode->handle() ~/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php 149
7 Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() ~/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php 53
6 Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}() ~/vendor/october/rain/src/Http/Middleware/TrustHosts.php 46
5 October\Rain\Http\Middleware\TrustHosts->handle() ~/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php 149
4 Illuminate\Pipeline\Pipeline->Illuminate\Pipeline\{closure}() ~/vendor/laravel/framework/src/Illuminate/Routing/Pipeline.php 53
3 Illuminate\Routing\Pipeline->Illuminate\Routing\{closure}() ~/vendor/laravel/framework/src/Illuminate/Pipeline/Pipeline.php 102
2 Illuminate\Pipeline\Pipeline->then() ~/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php 151
1 Illuminate\Foundation\Http\Kernel->sendRequestThroughRouter() ~/vendor/laravel/framework/src/Illuminate/Foundation/Http/Kernel.php 116
0 Illuminate\Foundation\Http\Kernel->handle() ~/index.php 43