Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notice: Trying to get property of non-object in /var/hda/web-apps/videos5/html/index.php on line 1688 #7

Open
GoogleCodeExporter opened this issue Mar 9, 2016 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. I assume error messages need to be turned on pretty high for this to show 
(because it's a notice)
2. While logged out, go to the home navigation (?p=/) and choose any user
3. At the top of the page the notice, "Notice: Trying to get property of 
non-object in /var/hda/web-apps/videos5/html/index.php on line 1688" is 
displayed

What is the expected output? What do you see instead?
I expect that notice to not be there.

What version of the product are you using? On what operating system?
The latest Amahi install using Fedora.

Please provide any additional information below.
I was able to track down the offending code and came up with a simple solution 
to fix it. On line 310 (per the version that I have) I modified:
<code>} else if (isset($_GET['p']) && !isset($_GET['u'])) {</code>
to be
<code>} else if (isset($_GET['p']) && !isset($_GET['u']) && 
is_object($current_user)) {</code>

That way the get_files_for_user isn't called until a user has actually signed 
in. Might not be the most elegant solution, but it's certainly the simplest 
that I could see.

Original issue reported on code.google.com by [email protected] on 8 May 2012 at 3:50

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

No branches or pull requests

1 participant