Skip to content
This repository has been archived by the owner on Mar 9, 2020. It is now read-only.

phphub5安装后报错Trying to get property of non-object (View ? #107

Open
wei98k opened this issue Sep 22, 2017 · 1 comment
Open

phphub5安装后报错Trying to get property of non-object (View ? #107

wei98k opened this issue Sep 22, 2017 · 1 comment

Comments

@wei98k
Copy link

wei98k commented Sep 22, 2017

报错信息

只有点头条才会报这个错误, 其他栏目及后台都正常.

Whoops, looks like something went wrong.

3/3
ErrorException in 39b255622d2f2e5a618436d895ff4a05 line 47:
Trying to get property of non-object (View: /home/wwwroot/phphub5/resources/views/share_links/partials/share_links.blade.php) (View: /home/wwwroot/phphub5/resources/views/share_links/partials/share_links.blade.php)

image

我的处理

app/Http/Controllers/CategoriesController.php

 21         if ($category->id == config('phphub.hunt_category_id')) {
 22             $topics->load('share_link');
 23             //$view = 'share_links.index';
 24             $view = 'topics.index';       
 25         } else {

如果我装模板文件替换成 topics.index 就不报错了, 为什么使用share_links.index就会呢?

@chorylee
Copy link

遇到同样的问题。按照你的处理更改好,可以不出错,可是头条特有的布局就没有了!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants