NomisCZ / hlstatsx-community-edition

HLstatsX Community Edition - PHP 7 and GeoIP2 supported
GNU General Public License v2.0
83 stars 48 forks source link

Edit Player or Clan Details Error #27

Closed Breadwinka closed 5 years ago

Breadwinka commented 5 years ago

Fatal error: Uncaught Error: Using $this when not in object context in C:\xampp\htdocs\hlx\pages\admintasks\tools_editdetails.php:66 Stack trace: #0 C:\xampp\htdocs\hlx\pages\admin.php(1079): include() #1 C:\xampp\htdocs\hlx\hlstats.php(222): include('C:\xampp\htdocs...') #2 {main} thrown in C:\xampp\htdocs\hlx\pages\admintasks\tools_editdetails.php on line 66

Anton-Beresansky commented 5 years ago

I have different environment, but similar problem. After recent update mode=admin&task=tools_editdetails_player page not saving edited data. No errors, have Profile updated successfully. text appearing but data remain unchanged.

Breadwinka commented 5 years ago

Describe the bug When clicking on Edit Player or Clan Details Error on the Admin page get the following error: Fatal error: Uncaught Error: Using $this when not in object context in

C:\xampp\htdocs\hlx\pages\admintasks\tools_editdetails.php:66 Stack trace: #0 C:\xampp\htdocs\hlx\pages\admin.php(1079): include() #1 C:\xampp\htdocs\hlx\hlstats.php(222): include('C:\xampp\htdocs...') #2 {main} thrown in C:\xampp\htdocs\hlx\pages\admintasks\tools_editdetails.php on line 66

To Reproduce Steps to reproduce the behavior:

  1. Go to Admin Login
  2. Click on Edit Player or Clan Details
  3. See error

Expected behavior Should see the Edit Player Or Clan Details page

Screenshots If applicable, add screenshots to help explain your problem. image

Environment

Additional context Running xampp 7.3.5

NomisCZ commented 5 years ago

Hello, please try it now (don't forget to update files).

Breadwinka commented 5 years ago

Hey NomisCZ,

Can confirm that removing that line resolved the error. But as Anton mentioned earlier. The actual editing or updating the player doesn't work even though it says it updates succesfully. This isn't a huge deal for me as if I wanted just modify the actual user in mysql.

NomisCZ commented 5 years ago

Please try it now, I fixed some DB class problems.

Breadwinka commented 5 years ago

Its working now, I also noticed in the toold_resetdbcollections.php line 99 throws an exception while ($row=mysql_fetch_assoc($rs)) should be while ($row=mysqli_fetch_assoc($rs))

NomisCZ commented 5 years ago

@Breadwinka OK, fixed.

Breadwinka commented 5 years ago

All fixed for me closing.