Jump to content

Weird Error


Monkeymatt

Recommended Posts

I've got this weird error:

[quote]
Strict standards: Non-static method Forum::load_many() cannot be called statically, assuming $this from compatible context Forum in C:\Xampp\xampp\htdocs\ekinboard\v2\class\database.class.php on line 184
[/quote]

Here is line 184:
[code]
$this->has_many_data[$name]=call_user_func_array(array(self::$has_many[$this->class][$name]["class"], "load_many"), array(array(array(self::$has_many[$this->class][$name]["foreign_id"],'=',$this->id))+self::$has_many[$this->class][$name]["conditions"], self::$has_many[$this->class][$name]["order"], null, null, null, self::$has_many[$this->class][$name]["class"]));
[/code]

Here is Forum::load_many definition:
[code]
public static function load_many(array $where, array $order=array(), $in=null, $low_limit=null, $num=null, $class=null) { global $FINAL_CLASS; return parent::load_many($where, $order, $in, $low_limit, $num, $FINAL_CLASS[get_class()]); }
[/code]

parent::load_many is here:
[code]
public static function load_many(array $where, array $order=array(), $in=null, $low_limit=null, $num=null, $class=null) {
$return=parent::load_many($where, $order, $in, $low_limit, $num, $class);
if ($return === false) {
return $return;
}
if ($class == null) {
$class=get_class();
}
$table=self::$tables[$class];
global $model;
foreach ($return as $to_save) {
$model->{$table}[$to_save->id]=&$to_save;
}
return $return;
}
[/code]

last parent::load_many:
[code]
public static function load_many(array $where, array $order=array(), $in=null, $low_limit=null, $num=null, $class=null) {
if ($class == null) {
$class=get_class();
}
if (in_array($class, self::$disallowed_classes)) {
global $error;
$error->make_error(4, "Attempted to load_many() of '".$class."' which is not allowed");
return false;
}
if (empty(self::$tables[$class]) || empty(self::$id_row[self::$tables[$class]])) {
global $error;
$error->make_error(5, "Missing information necessary for '".$class."' to initiate");
}
$results=self::$database->select(self::$tables[$class], $where, $order, $low_limit, $num, array('*'), $in);
$return=array();
foreach ($results as $resultnow) {
$temp=new $class();
$temp->load_array($resultnow);
$return[]=$temp;
}
return $return;
}
[/code]

Any help would be appreciated.

Monkeymatt
Link to comment
https://forums.phpfreaks.com/topic/35762-weird-error/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.