Ich brauche nochmal eure hilfe .....
wie vermeide ich den o.g. Fehler ?
[29-Sep-2017 15:19:09] NOTICE: "Undefined offset: 502"
File: /var/www/virtual/***********/htdocs/includes/libs/Smarty/sysplugins/smarty_internal_templatebase.php(252) : eval()'d code | Line: 498
URL: http://***********/game.php?page=raport&mode=battlehall&raport=905712b9614996feed6ddcfca1198774 | Version: V 1.0
Stack trace:
#0 /includes/libs/Smarty/sysplugins/smarty_internal_templatebase.php(252) : eval()'d code(498): errorHandler(8, 'Undefined offse...', '/var/www/virtua...', 498, Array)
#1 /includes/libs/Smarty/sysplugins/smarty_internal_templatebase.php(252): eval()
#2 /includes/libs/Smarty/sysplugins/smarty_internal_templatebase.php(374): Smarty_Internal_TemplateBase->fetch('extends:layout....', NULL, NULL, NULL, true)
#3 /includes/classes/class.template.php(142): Smarty_Internal_TemplateBase->display('extends:layout....')
#4 /includes/pages/game/class.AbstractPage.php(1121): template->display('extends:layout....')
#5 /includes/pages/game/class.ShowRaportPage.php(130): AbstractPage->display('shared.mission....')
#6 /game.php(40): ShowRaportPage->battlehall()
#7 {main}
************* <- = meine URL
den Fehler bekomme ich wenn ich von der BattleHall den KB aufrufen möchte
meine class.ShowRaportPage.php sieht so aus
Display All
suche hier im Forum hat mich dazu auch nicht weiter gebracht. Wenn es um 502 geht ist der Typ als Missile in der DB drinne und auch im LNG Tech
wie vermeide ich den o.g. Fehler ?
[29-Sep-2017 15:19:09] NOTICE: "Undefined offset: 502"
File: /var/www/virtual/***********/htdocs/includes/libs/Smarty/sysplugins/smarty_internal_templatebase.php(252) : eval()'d code | Line: 498
URL: http://***********/game.php?page=raport&mode=battlehall&raport=905712b9614996feed6ddcfca1198774 | Version: V 1.0
Stack trace:
#0 /includes/libs/Smarty/sysplugins/smarty_internal_templatebase.php(252) : eval()'d code(498): errorHandler(8, 'Undefined offse...', '/var/www/virtua...', 498, Array)
#1 /includes/libs/Smarty/sysplugins/smarty_internal_templatebase.php(252): eval()
#2 /includes/libs/Smarty/sysplugins/smarty_internal_templatebase.php(374): Smarty_Internal_TemplateBase->fetch('extends:layout....', NULL, NULL, NULL, true)
#3 /includes/classes/class.template.php(142): Smarty_Internal_TemplateBase->display('extends:layout....')
#4 /includes/pages/game/class.AbstractPage.php(1121): template->display('extends:layout....')
#5 /includes/pages/game/class.ShowRaportPage.php(130): AbstractPage->display('shared.mission....')
#6 /game.php(40): ShowRaportPage->battlehall()
#7 {main}
************* <- = meine URL
den Fehler bekomme ich wenn ich von der BattleHall den KB aufrufen möchte
meine class.ShowRaportPage.php sieht so aus
PHP Source Code
- <?php
- class ShowRaportPage extends AbstractPage
- {
- public static $requireModule = 0;
- protected $disableEcoSystem = true;
- function __construct()
- {
- parent::__construct();
- }
- private function BCWrapperPreRev2321($CombatRaport)
- {
- if(isset($CombatRaport['moon']['desfail']))
- {
- $CombatRaport['moon'] = array(
- 'moonName' => $CombatRaport['moon']['name'],
- 'moonChance' => $CombatRaport['moon']['chance'],
- 'moonDestroySuccess' => !$CombatRaport['moon']['desfail'],
- 'fleetDestroyChance' => $CombatRaport['moon']['chance2'],
- 'fleetDestroySuccess' => !$CombatRaport['moon']['fleetfail']
- );
- }
- elseif(isset($CombatRaport['moon'][0]))
- {
- $CombatRaport['moon'] = array(
- 'moonName' => $CombatRaport['moon'][1],
- 'moonChance' => $CombatRaport['moon'][0],
- 'moonDestroySuccess' => !$CombatRaport['moon'][2],
- 'fleetDestroyChance' => $CombatRaport['moon'][3],
- 'fleetDestroySuccess' => !$CombatRaport['moon'][4]
- );
- }
- if(isset($CombatRaport['simu']))
- {
- $CombatRaport['additionalInfo'] = $CombatRaport['simu'];
- }
- if(isset($CombatRaport['debris'][0]))
- {
- $CombatRaport['debris'] = array(
- 901 => $CombatRaport['debris'][0],
- 902 => $CombatRaport['debris'][1]
- );
- }
- if (!empty($CombatRaport['steal']['metal']))
- {
- $CombatRaport['steal'] = array(
- 901 => $CombatRaport['steal']['metal'],
- 902 => $CombatRaport['steal']['crystal'],
- 903 => $CombatRaport['steal']['deuterium']
- );
- }
- return $CombatRaport;
- }
- function battlehall()
- {
- global $LNG, $USER;
- $LNG->includeData(array('FLEET'));
- $this->setWindow('popup');
- $RID = HTTP::_GP('raport', '');
- $Raport = $GLOBALS['DATABASE']->getFirstRow("SELECT
- raport, time,
- (
- SELECT
- GROUP_CONCAT(username SEPARATOR ' • ') as attacker
- FROM ".USERS."
- WHERE id IN (SELECT uid FROM ".TOPKB_USERS." WHERE ".TOPKB_USERS.".rid = ".RW.".rid AND role = 1)
- ) as attacker,
- (
- SELECT
- GROUP_CONCAT(username SEPARATOR ' • ') as defender
- FROM ".USERS."
- WHERE id IN (SELECT uid FROM ".TOPKB_USERS." WHERE ".TOPKB_USERS.".rid = ".RW.".rid AND role = 2)
- ) as defender
- FROM ".RW."
- WHERE rid = '".$GLOBALS['DATABASE']->escape($RID)."';");
- $Info = array($Raport["attacker"], $Raport["defender"]);
- if(!isset($Raport)) {
- $this->printMessage($LNG['sys_raport_not_found']);
- }
- $CombatRaport = unserialize($Raport['raport']);
- $CombatRaport['time'] = _date($LNG['php_tdformat'], $CombatRaport['time'], $USER['timezone']);
- $CombatRaport = $this->BCWrapperPreRev2321($CombatRaport);
- $this->tplObj->assign_vars(array(
- 'Raport' => $CombatRaport,
- 'Info' => $Info,
- 'pageTitle' => $LNG['lm_topkb']
- ));
- $this->display('shared.mission.raportbis.tpl');
- }
- function show()
- {
- global $LNG, $USER;
- $LNG->includeData(array('FLEET'));
- $this->setWindow('popup');
- $RID = HTTP::_GP('raport', '');
- $raportData = $GLOBALS['DATABASE']->getFirstRow("SELECT raport,attacker,defender FROM ".RW." WHERE rid = '".$GLOBALS['DATABASE']->escape($RID)."';");
- if(empty($raportData)) {
- $this->printMessage($LNG['sys_raport_not_found']);
- }
- // empty is BC for pre r2484
- $isAttacker = empty($raportData['attacker']) || in_array($USER['id'], explode(",", $raportData['attacker']));
- $isDefender = empty($raportData['defender']) || in_array($USER['id'], explode(",", $raportData['defender']));
- if(empty($raportData) || (!$isAttacker && !$isDefender && !$USER['authlevel'] == 3)) {
- $this->printMessage($LNG['sys_raport_not_found']);
- }
- $CombatRaport = unserialize($raportData['raport']);
- if($isAttacker && !$isDefender && $CombatRaport['result'] == 'r' && count($CombatRaport['rounds']) <= 2) {
- $this->printMessage($LNG['sys_raport_lost_contact']);
- }
- $CombatRaport['time'] = _date($LNG['php_tdformat'], $CombatRaport['time'], (isset($USER['timezone']) ? $USER['timezone'] : Config::get('timezone')));
- $CombatRaport = $this->BCWrapperPreRev2321($CombatRaport);
- $this->tplObj->assign_vars(array(
- 'Raport' => $CombatRaport,
- 'pageTitle' => $LNG['sys_mess_attack_report']
- ));
- $this->display('shared.mission.raport.tpl');
- }
- }
suche hier im Forum hat mich dazu auch nicht weiter gebracht. Wenn es um 502 geht ist der Typ als Missile in der DB drinne und auch im LNG Tech