The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.2.25 (Linux)
File Line Function
/global.php(961) : eval()'d code 26 errorHandler->error
/global.php 961 eval
/showthread.php 28 require_once





× This forum is read only. As of July 23, 2019, the UserSpice forums have been closed. To receive support, please join our Discord by clicking here. Thank you!

  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Help with init.php
#1
Hello there!

I've finally set the public version of the project I've been working on the last few weeks - it's on

http://site.veracruz.edu.br/registrodehoras/index.php

As you guys can see, I keep on getting the message

"Notice: Trying to get property of non-object in D:\xampp\htdocs\registrodehoras\usersc\includes\navigation.php on line 15

Notice: Trying to get property of non-object in D:\xampp\htdocs\registrodehoras\users\helpers\us_helpers.php on line 485"
.

I'm pretty sure that on the path that Userspice got during installation, it shouldn't be anything like "D:\xampp". The installation said it should be fixed in init.php . I'm looking at init.php right now, though, and I can't find what I should change so that this won't happen anymore. I think that several of the other pages that are not working at the moment aren't working because of that.

Can you help me please?

Thank you

M!
  Reply
#2
Ok. So it looks like that has something to do with you trying to get information that is requiring the user to be logged in. I'm not sure what's going on with your navigation because that's a custom file. If you want, you can post your whole navigation.php file to pastebin or hastebin and I'll take a look, but I'm going to guess that you have something going on in line 15 or around it that is looking for a user id or something like that.

Try logging in and then going to the home page. My guess is that the error will go away.

If you're doing some sort of logic on line 15, you could do something like

Code:
if($user->isLoggedIn()){
//whatever you were doing on line 15
Code:
}
  Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)