Call to static method Flux::message() with incorrect case: Message
28 $errorMessage = Flux::Message('CMSPagePathError');
29 }
30 elseif($body === '') {
31 $errorMessage = Flux::Message('CMSPageBodyError'); 32 }
33 else {
34 $sql = "UPDATE {$server->loginDatabase}.$pages SET title = ?, path = ?, body = ?, modified = NOW() WHERE id = ?";
Call to static method Flux::message() with incorrect case: Message
25 $errorMessage = Flux::Message('CMSPageTitleError');
26 }
27 elseif($path === '') {
28 $errorMessage = Flux::Message('CMSPagePathError');29 }
30 elseif($body === '') {
31 $errorMessage = Flux::Message('CMSPageBodyError');
Call to static method Flux::message() with incorrect case: Message
22 $body = trim($params->get('page_body'));
23
24 if($title === '') {
25 $errorMessage = Flux::Message('CMSPageTitleError');26 }
27 elseif($path === '') {
28 $errorMessage = Flux::Message('CMSPagePathError');
Call to static method Flux::message() with incorrect case: Message
19 $errorMessage = Flux::Message('CMSPagePathError');
20 }
21 elseif($page_body === '') {
22 $errorMessage = Flux::Message('CMSPageBodyError'); 23 }
24 else {
25 $sql = "INSERT INTO {$server->loginDatabase}.$pages (title, path, body, modified)";
Call to static method Flux::message() with incorrect case: Message
16 $errorMessage = Flux::Message('CMSPageTitleError');
17 }
18 elseif($page_path === '') {
19 $errorMessage = Flux::Message('CMSPagePathError');20 }
21 elseif($page_body === '') {
22 $errorMessage = Flux::Message('CMSPageBodyError');
Call to static method Flux::message() with incorrect case: Message
13if(count($_POST))
14{
15 if($page_title === '') {
16 $errorMessage = Flux::Message('CMSPageTitleError');17 }
18 elseif($page_path === '') {
19 $errorMessage = Flux::Message('CMSPagePathError');
Call to static method Flux::message() with incorrect case: Message
29 $errorMessage = Flux::Message('CMSNewsBody');
30 }
31 elseif($author == '') {
32 $errorMessage = Flux::Message('CMSNewsAuthor');33 }
34 else {
35 if($link) {
Call to static method Flux::message() with incorrect case: Message
26 $errorMessage = Flux::Message('CMSNewsTitleError');
27 }
28 elseif($body === '') {
29 $errorMessage = Flux::Message('CMSNewsBody');30 }
31 elseif($author == '') {
32 $errorMessage = Flux::Message('CMSNewsAuthor');
Call to static method Flux::message() with incorrect case: Message
23 $author = trim($params->get('news_author'));
24
25 if($title === '') {
26 $errorMessage = Flux::Message('CMSNewsTitleError');27 }
28 elseif($body === '') {
29 $errorMessage = Flux::Message('CMSNewsBody');
Call to static method Flux::message() with incorrect case: Message
19 $errorMessage = Flux::Message('CMSNewsBody');
20 }
21 elseif($author === '') {
22 $errorMessage = Flux::Message('CMSNewsAuthor');23 }
24 else {
25 if($link) {
Call to static method Flux::message() with incorrect case: Message
16 $errorMessage = Flux::Message('CMSNewsTitleError');
17 }
18 elseif($body === '') {
19 $errorMessage = Flux::Message('CMSNewsBody');20 }
21 elseif($author === '') {
22 $errorMessage = Flux::Message('CMSNewsAuthor');
Call to static method Flux::message() with incorrect case: Message
13
14if(count($_POST)){
15 if($title === '') {
16 $errorMessage = Flux::Message('CMSNewsTitleError');17 }
18 elseif($body === '') {
19 $errorMessage = Flux::Message('CMSNewsBody');
Static method Flux::getEquipLocationCombination() invoked with 1 parameter, 0 required
1135 */
1136 public function equipLocationCombinationText($id)
1137 {
1138 return Flux::getEquipLocationCombination($id);1139 }
1140
1141 /**
Description
Invalid call to a static method. This would lead to a run time error.
This issue can be raised for any of the following cases:
- There's a typo in either the method call or class name.
- The class on which the static method is called:
- might not exist
- might not be a
Class
- has not been imported into this scope
- The method you are trying to call is not a
static
method. - The method you are trying to call is a private static method from a parent class.
Bad practice
class Output
{
public static function writeMagic()
{
echo 'Magic!';
}
public function print()
{
return self::writeMaagic(); // typo, writeMaagic() doesn't exist
}
}
class Output
{
public static function writeMagic()
{
echo 'Magic!';
}
public function print()
{
return self::writemagic(); // typo
}
}
class PrettyLog
{
public static function log($data): void
{
}
}
class Log
{
public function print()
{
$logger = false;
return $logger::log('Something'); // $logger is not a class
}
}
function log() {
self::log(); // self/static can only be resolved inside a class
};
class Output
{
public function writeMagic()
{
echo 'Magic!';
}
public function print()
{
return self::writeMagic(); // writeMagic() is not a static method
}
}
class SuperOutput
{
private static function writeMagic()
{
echo 'Magic!';
}
}
class Output extends SuperOutput
{
public function print()
{
return static::writeMagic(); // writeMagic() is a private static method
}
}
Recommended
class Output
{
public static function writeMagic()
{
echo 'Magic!';
}
public function print()
{
return self::writeMagic();
}
}
class PrettyLog
{
public static function log($data): void
{
}
}
class Log
{
public function print()
{
$logger = 'PrettyLog';
return $logger::log('Something');
}
}
function log() {
PrettyLogger::log();
};
class SuperOutput
{
protected static function writeMagic()
{
echo 'Magic!';
}
}
class Output extends SuperOutput
{
public function print()
{
return static::writeMagic();
}
}