Fehlermeldung:
Notice: Trying to get property of non-object in C:\xampp\htdocs\tpl\staffs\New.tpl.php on line 26
Inhalt New.tpl.php Z.20-30:
PHP
</div>
<div class="staffWorking"></div>
</div>
</div>
</div>
<div style="position: relative;width: 1042px; height: 781px;margin-top:-15px; background-image: url(<?php echo CMS_PATH; ?>public/images/staffs/infobus.png);">
<?php
foreach($this->staffs as $staff) {
$nStaff = $this->userFactory->getUserById($staff->user_id);
if($nStaff->rank > 2) {
?>
<div class="staff" onMouseOver="showInfo('<?php echo $nStaff->id; ?>')" opacity="<?php if($nStaff->online == 0) { echo '0.5'; } else { echo '1'; } ?>" style="opacity: 0;position: absolute; top: <?php echo $staff->pos_y - 50; ?>px;left: <?php echo $staff->pos_x; ?>px;"><img src="http://habbor.de/avatarimager.php?figure=<?php echo $nStaff->look.$staff->look; ?>" /></div>
<?php } } ?>
</div>
Alles anzeigen
P.S. Z.26 ist: if($nStaff->rank > 2) {
Danke im Vorraus