The following warnings occurred:
Warning [2] Undefined variable $unreadreports - Line: 26 - File: global.php(961) : eval()'d code PHP 8.1.2-1ubuntu2.14 (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
Error not find user profile
#1
How to know if the query has any result?

When you are entering:
http://localhost/userspice/user_profile....=blablabla

I would like to show a warning "error" or something other than the page being displayed. How could you do this?

when I put http://localhost/userspice/user_profile.php if an error message appears.
  Reply
#2
That is an oversight on our part. @mudmin will need to fix that in the next 4.1.x release (I think there should at least be a 4.1.6 before 4.2).

I wrote something quick for the time being:

http://pastebin.com/uEAxyLcN

Replace the top "if(isset)....else" block with the pastebin above.
  Reply
#3
Thanks for the prompt response and helpful, just stay alert type Notice in each case:

http://localhost/userspice/user_profile.php?id=1
Notice: Undefined variable: thisUserID in D:\Google Drive\Servidores\local\userspice\user_profile.php on line 34

http://localhost/userspice/user_profile....=blablabla
Notice: Undefined offset: 0 in D:\Google Drive\Servidores\local\userspice\classes\DB.php on line 155
  Reply
#4
Wait, where did the user_profile.php file come from? We have user_settings.php and profile.php. The file the patch is for is profile.php
  Reply
#5
If it is correct, make some modifications to the file names and folder paths, but the code works as the original.
  Reply
#6
Yep. Brian added this to the bug list and I'll push it out with the next release. The profile feature was never meant to be part of userspice. People just needed a quick example project on how to relate features to particular usernames, so I wrote it as a demo. This is definitely an oversight that I can fix and will probably be part of the next Debugging with Dan video.

On another note...obviously you are welcome to use UserSpice however you see fit, but we do provide a lot of tools to give you the opportunity to copy instead of modifying/renaming core userspice files. Just know that if you do away with core files, other features may not work after upgrades happen and you may be out of sync.

As always, when I push out a new release I also push a complete diff onto github. https://github.com/mudmin/UserSpice4/com...25d5f7a2b3

Ideally, though, core files should be left alone if possible.
  Reply
#7
If you're right, but I'm not working on a project, it's just a matter of taste how everything works, I like to rename files, folders, move things around, to see how flexible is, there may come a time when no need as many files and when you actually need to delete something, I can react to errors.
  Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)