• 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!

account.php error

Marcin16

New Member
Joined
Jun 23, 2022
Messages
9
Reaction score
0
GitHub
Lechu
[error] 105175#105175: *9528 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to a member function fetch() on bool in /var/www/html/classes/account.php:33
does anyone know how to fix it ? i am using ubuntu 20.0.4
 
sounds like a table issue, you are trying to fetch data from something that doesn't exist.

Paste here line 30-35 of account.php
 
if(in_array($search_by, self::$fields))
$search_string = $this->getDatabaseHandler()->fieldName($search_by) . ' = ' . $this->getDatabaseHandler()->quote($search_text);
else
new Error_Critic('', 'Wrong Account search_by type.');
$fieldsArray = array();
foreach(self::$fields as $fieldName)
$fieldsArray[$fieldName] = $this->getDatabaseHandler()->fieldName($fieldName);
$this->data = $this->getDatabaseHandler()->query('SELECT ' . implode(', ', $fieldsArray) . ' FROM ' . $this->getDatabaseHandler()->tableName(self::$table) . ' WHERE ' . $search_string)->fetch();
 
Just before (the last line):
PHP:
$this->data = $this->getDatabaseHandler()->query('SELECT ' . implode(', ', $fieldsArray) . ' FROM ' . $this->getDatabaseHandler()->tableName(self::$table) . ' WHERE ' . $search_string)->fetch();

Add:
Code:
echo 'SELECT ' . implode(', ', $fieldsArray) . ' FROM ' . $this->getDatabaseHandler()->tableName(self::$table) . ' WHERE ' . $search_string;
exit;

and tell me what it prints out
 
SELECT id, name, password, premdays, p_vocations, p_vocations1, lastday, email, group_id, create_ip, create_date, premium_points, page_access, location, rlname, email_new, email_new_time, email_code, next_email, last_post, flag FROM accounts WHERE name = 'Login'

now shows my that
 
Back
Top