Call to an undefined method OAuth::getOauth64()
472 if (is_null($OAuth)) {
473 return false;
474 }
475 $oauth = $OAuth->getOauth64(); 476
477 // Start authentication
478 if (!$this->sendCommand('AUTH', 'AUTH XOAUTH2 ' . $oauth, 235)) {
Call to an undefined method Flux_SessionData::setMessageData()
421 public function getMessage()
422 {
423 $message = $this->message;
424 $this->setMessageData(null);425 return $message;
426 }
427}
Call to an undefined method Flux_SessionData::setUsernameData()
334 }
335
336 $this->setServerNameData($server);
337 $this->setUsernameData($username);338 $this->initialize(false);
339 }
340 else {
Call to an undefined method Flux_SessionData::setServerNameData()
333 throw new Flux_LoginError('Permanently banned', Flux_LoginError::PERMABANNED);
334 }
335
336 $this->setServerNameData($server);337 $this->setUsernameData($username);
338 $this->initialize(false);
339 }
Call to an undefined method Flux_SessionData::setThemeData()
155 }
156
157 if (!$this->theme || $this->theme === 'installer') { // always update if coming from installer
158 $this->setThemeData(Flux::config('ThemeName.0'));159 }
160
161 return true;
Call to an undefined method Flux_SessionData::setCartData()
129 }
130
131 if (!is_array($this->cart)) {
132 $this->setCartData(array());133 }
134
135 if ($this->account->account_id && $this->loginAthenaGroup) {
Call to an undefined method Flux_SessionData::setAthenaServerNameData()
107 }
108
109 if (!$this->athenaServerName || ((!$loggedIn && !$this->getAthenaServer($cfgAthenaServerName)) || !$this->getAthenaServer($this->athenaServerName))) {
110 $this->setAthenaServerNameData(current($this->getAthenaServerNames()));111 }
112 }
113
Call to an undefined method Flux_SessionData::setAthenaServerNameData()
103 $this->loginServer = $this->loginAthenaGroup->loginServer;
104
105 if (!$loggedIn && $cfgAthenaServerName && $this->getAthenaServer($cfgAthenaServerName)) {
106 $this->setAthenaServerNameData($cfgAthenaServerName);107 }
108
109 if (!$this->athenaServerName || ((!$loggedIn && !$this->getAthenaServer($cfgAthenaServerName)) || !$this->getAthenaServer($this->athenaServerName))) {
Call to an undefined method Flux_SessionData::setServerNameData()
94 }
95 else {
96 $defaultServerName = current(array_keys(Flux::$loginAthenaGroupRegistry));
97 $this->setServerNameData($defaultServerName); 98 }
99 }
100
Call to an undefined method Flux_SessionData::setServerNameData()
90 $cfgLoginAthenaGroup = Flux::config('DefaultLoginGroup');
91
92 if (Flux::getServerGroupByName($cfgLoginAthenaGroup)){
93 $this->setServerNameData($cfgLoginAthenaGroup); 94 }
95 else {
96 $defaultServerName = current(array_keys(Flux::$loginAthenaGroupRegistry));
Call to method PHPMailer::isSMTP() with incorrect case: IsSMTP
21 $this->log = self::$log;
22
23 if (Flux::config('MailerUseSMTP')) {
24 $pm->IsSMTP();25
26 if (is_array($hosts=Flux::config('MailerSMTPHosts'))) {
27 $hosts = implode(';', $hosts);
Call to an undefined method Flux_Config::getGroupID()
205
206 $sql = "INSERT INTO {$this->loginDatabase}.login (userid, user_pass, email, sex, group_id, birthdate) VALUES (?, ?, ?, ?, ?, ?)";
207 $sth = $this->connection->getStatement($sql);
208 $res = $sth->execute(array($username, $password, $email, $gender, (int)$this->config->getGroupID(), date('Y-m-d', $birthdatestamp)));209
210 if ($res) {
211 $idsth = $this->connection->getStatement("SELECT LAST_INSERT_ID() AS account_id");
Call to an undefined method Flux_Config::getUseMD5()
199 }
200 }
201
202 if ($this->config->getUseMD5()) {203 $password = Flux::hashPassword($password);
204 }
205
Call to an undefined method Flux_Config::getNoCase()
173 }
174
175 $sql = "SELECT userid FROM {$this->loginDatabase}.login WHERE ";
176 if ($this->config->getNoCase()) {177 $sql .= 'LOWER(userid) = LOWER(?) ';
178 }
179 else {
Call to an undefined method Flux_Config::getNoCase()
85 }
86
87 $sql = "SELECT userid FROM {$this->loginDatabase}.login WHERE sex != 'S' AND group_id >= 0 ";
88 if ($this->config->getNoCase()) { 89 $sql .= 'AND LOWER(userid) = LOWER(?) ';
90 }
91 else {
Call to an undefined method Flux_Config::getDatabase()
60 {
61 $this->connection = $connection;
62 $this->logsDatabase = $connection->logsDbConfig->getDatabase();
63 $this->webDatabase = $connection->webDbConfig->getDatabase(); 64
65 return $connection;
66 }
Call to an undefined method Flux_Config::getDatabase()
59 public function setConnection(Flux_Connection $connection)
60 {
61 $this->connection = $connection;
62 $this->logsDatabase = $connection->logsDbConfig->getDatabase(); 63 $this->webDatabase = $connection->webDbConfig->getDatabase();
64
65 return $connection;
Call to an undefined method Flux_Config::getDatabase()
46 public function __construct(Flux_Config $config)
47 {
48 parent::__construct($config);
49 $this->loginDatabase = $config->getDatabase(); 50 }
51
52 /**
Call to an undefined method Flux_Config::getDatabase()
72 $this->loginServer = $loginServer;
73 $this->loginDatabase = $loginServer->config->getDatabase();
74 $this->logsDatabase = $connection->logsDbConfig->getDatabase();
75 $this->webDatabase = $connection->webDbConfig->getDatabase(); 76
77 // Assign connection to LoginServer, used mainly to enable
78 // authentication feature.
Call to an undefined method Flux_Config::getDatabase()
71 $this->connection = $connection;
72 $this->loginServer = $loginServer;
73 $this->loginDatabase = $loginServer->config->getDatabase();
74 $this->logsDatabase = $connection->logsDbConfig->getDatabase(); 75 $this->webDatabase = $connection->webDbConfig->getDatabase();
76
77 // Assign connection to LoginServer, used mainly to enable
Call to an undefined method Flux_Config::getDatabase()
70 $this->serverName = $serverName;
71 $this->connection = $connection;
72 $this->loginServer = $loginServer;
73 $this->loginDatabase = $loginServer->config->getDatabase(); 74 $this->logsDatabase = $connection->logsDbConfig->getDatabase();
75 $this->webDatabase = $connection->webDbConfig->getDatabase();
76
Method Flux_ItemShop::buy() invoked with 1 parameter, 2 required
80 'name' => $cartItem->shop_item_name,
81 'cost' => $cartItem->shop_item_cost,
82 'quantity' => $cartItem->shop_item_qty,
83 'success' => $fromShop->buy($cartItem->shop_item_id) 84 );
85 }
86
Call to an undefined method Flux_SessionData::setMessageData()
223 $baseURI, rawurlencode($loginModule), rawurlencode($loginAction), rawurlencode($_SERVER['REQUEST_URI']));
224 }
225
226 $session->setMessageData($message);227 header('Location: '.preg_replace('&/{2,}&', '/', $loginURL));
228 exit;
229 }
Call to an undefined method Flux_SessionData::setMessageData()
128 $auth = Flux_Authorization::getInstance();
129 if ($auth->actionAllowed($moduleName, $actionName) === false) {
130 if (!Flux::$sessionData->isLoggedIn()) {
131 Flux::$sessionData->setMessageData('Please log-in to continue.');132 $this->loginRequired($baseURI);
133 }
134 else {
Call to an undefined method Flux_Config::getEncoding()
47 $this->_dbConfig = new Flux_Config($tmpArr);
48 }
49
50 $this->_encFrom = $this->_dbConfig->getEncoding();51 $this->_encTo = $this->_encFrom ? $this->_dbConfig->get('Convert') : false;
52
53 if (!is_null($data)) {
Description
The method you are trying to call is not defined, which can result in a fatal error.
This issue can be raised for any of the following cases:
- There's a spelling mistake in the method call.
- The method is not defined in either the class or its ancestors.
- You are trying to call a private method from a parent class.
- You are attempting to access an improperly instantiated object or an undefined variable.
- You are trying to use the return value of a method that returns
void
.
Bad practice
class User
{
public function printName()
{
echo $this->getName(); // getName() doesn't exist.
}
}
class User
{
private function getName()
{
return 'John Doe';
}
}
class Admin extends User
{
public function printName()
{
echo $this->getName(); // `getName()` is private
}
}
class Admin
{
public function printName()
{
$user = new User(); // class `User` doesn't exist
echo $user->getName();
}
}
class User
{
private $name;
public function setName()
{
$this->name = 'Anonymous';
}
public function printName()
{
$name = $this->setName(); // the "setName" method doesn't return anything
echo $name; // this will print nothing, because $name is NULL
}
}
Recommended
class User
{
public function printName()
{
echo $this->getName();
}
public function getName()
{
return 'John Doe';
}
}
class User
{
protected function getName()
{
return 'John Doe';
}
}
class Admin extends User
{
public function printName()
{
echo $this->getName();
}
}
class User
{
public function getName()
{
return 'John Doe';
}
}
class Admin
{
public function printName()
{
$user = new User();
echo $user->getName();
}
}