• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • If you're using Gesior 2012 or MyAAC, please review this thread for information about a serious security vulnerability and a fix.

AAC Gesior - Error assigning premium points

potinho

Well-Known Member
Joined
Oct 11, 2009
Messages
1,190
Solutions
17
Reaction score
92
Location
Brazil
Today I tried to give premium points in Gesior's shop (Gesior 2012) but it's giving me an error, the error below only returns when giving points to a specific player (perhaps for fulfilling the name?). For players with a shorter name it works normally. can you help me?

Error:

Fatal error: Uncaught Error: Call to a member function fetch() on boolean in C:\xampp\htdocs\pages\shopadmin.php:320 Stack trace: #0 C:\xampp\htdocs\system\load.page.php(7): include() #1 C:\xampp\htdocs\index.php(40): include_once('C:\\xampp\\htdocs...') #2 {main} thrown in C:\xampp\htdocs\pages\shopadmin.php on line 320

Those lines in shopadmin.php

PHP:
[/B]
    break;
        case 'points_add':
            $player = stripslashes(ucwords(strtolower(trim($_POST['char_name']))));
            $points = is_numeric($_POST['char_points']) ? $_POST['char_points'] : 0;

            if(strlen($player) > 0){
                $data   = $SQL->query("SELECT * FROM `players` WHERE `name` = '".$player."';")->fetch();

                if($data['account_id']){
                    $SQL->query("UPDATE `accounts` SET `premium_points` = `premium_points` + '".$points."' WHERE `id` = '".$data['account_id']."'");
                    $main_content .= '<strong class="success">Pontos adicionados com sucesso à: <i>'.$player.'</i></strong><br /><br /><a href="?subtopic=shopadmin">Voltar</a>';
                }else{
                    $main_content .= '<strong class="error">O character indicado não existe.</strong><br /><br /><a href="?subtopic=shopadmin&action=points">Voltar</a>';
                }

                
            }else{
                $main_content .= '<strong class="error">Preencha o nome do Character.</strong><br /><br /><a href="?subtopic=shopadmin&action=points">Voltar</a>';
            }            
            break;
 
Top