Code:
Warning: current() expects parameter 1 to be array, null given in C:\Program Files (x86)\VertrigoServ\www\class\player.php on line 196
PHP:
//make items
$sid = 100;
while ($item = current($cfg['vocations'][$this->attrs['vocation']]['equipment'])){ // Linia 196
$sid++;
$d['player_id'] = $this->attrs['id'];
$d['pid'] = key($cfg['vocations'][$this->attrs['vocation']]['equipment']);
$d['sid'] = $sid;
$d['itemtype'] = $item;
if (!$this->myInsert('player_items',$d)) throw new Exception('Player::make() Cannot insert items:<br/>'.$this->getError());
unset($d);
next($cfg['vocations'][$this->attrs['vocation']]['equipment']);
}
Prosz? o pomoc w rozwi?zaniu problemu.