diff --git a/app/Http/Controllers/user/UserController.php b/app/Http/Controllers/user/UserController.php index 4eda98a..c18fa7e 100755 --- a/app/Http/Controllers/user/UserController.php +++ b/app/Http/Controllers/user/UserController.php @@ -34,10 +34,10 @@ class UserController extends Controller $post_data = array( 'isStoreOwner' => true, - 'store_order' => $countStoreOrder[0]->count_order, - 'store_income' => $storeIncome[0]->store_income, - 'store_product_count' => $countStoreProduct[0]->store_product_count, - 'store_published_product' => $countStorePublishedProduct[0]->store_published_product + 'store_order' => isset($countStoreOrder[0]->count_order) ? $countStoreOrder[0]->count_order : 0, + 'store_income' => isset($storeIncome[0]->store_income) ? $storeIncome[0]->store_income : 0, + 'store_product_count' => isset($countStoreProduct[0]->store_product_count) ? $countStoreProduct[0]->store_product_count : 0, + 'store_published_product' => isset($countStorePublishedProduct[0]->store_published_product) ? $countStorePublishedProduct[0]->store_published_product : 0 ); } else { $post_data = array(