hallo,

ik krijg deze melding :

PHP Strict Standards: Non-static method users::um_settings() should not be called statically, assuming $this from incompatible context in /var/www/vhosts/14/122093/webspace/httpdocs/trefpoint.com/cms/classes/core/um_class.php on line 15
PHP Strict Standards: Non-static method cms::db_connect() should not be called statically, assuming $this from incompatible context in /var/www/vhosts/14/122093/webspace/httpdocs/trefpoint.com/cms/classes/core/um_class.php on line 103
PHP Strict Standards: Non-static method users::um_settings() should not be called statically, assuming $this from incompatible context in /var/www/vhosts/14/122093/webspace/httpdocs/trefpoint.com/cms/classes/core/um_class.php on line 15
PHP Strict Standards: Non-static method cms::db_connect() should not be called statically, assuming $this from incompatible context in /var/www/vhosts/14/122093/webspace/httpdocs/trefpoint.com/cms/classes/core/um_class.php on line 103


dat zijn deze regels in mijn class :

line 15: users :: um_settings ($table = "um_settings", $prefix = "");
line 103: $db = cms :: db_connect();

kan iemand mij hiermee helpen

gerrit
De oplossing staat in de foutmelding.
hallo,

bedankt voor je reactie, maar dat is het probleem, ik snap hem eve niet..
De methoden (functions) hebben het keyword static niet in de declaratie zitten, maar je gebruikt deze wel alsof dit static methoden zijn. Voeg dus dit keyword toe bij deze methoden.

Vergelijk:
<?php
error_reporting(E_STRICT);

class SomeClass
{
    public function someMethod() {
        // stuff
    }
}

// geeft warning
$test = SomeClass::someMethod();

class SomeClassTwo
{
    public static function someMethod() {
        // stuff
    }
}

// geeft geen warning
$test = SomeClassTwo::someMethod();
?>

Reageren