undeadrex Posted May 18, 2016 Posted May 18, 2016 I'm seeing this 2 error in my Flux CP error_log Can someone help me with this problem? it's spamming my disk space every 1 minute >.< [18-May-2016 16:02:26 Asia/Hong_Kong] PHP Notice: Trying to get property of non-object in /home/anci/public_html/themes/default/main/rsslib.php on line 1 <?php $RSS_Content = array(); function RSS_Tags($item, $type) {$y = array(); $tnl = $item->getElementsByTagName("title"); $tnl = $tnl->item(0); $title = $tnl->firstChild->textContent; $tnl = $item->getElementsByTagName("link"); $tnl = $tnl->item(0); $link = $tnl->firstChild->textContent; $tnl = $item->getElementsByTagName("pubDate"); $tnl = $tnl->item(0); $date = $tnl->firstChild->textContent; $tnl = $item->getElementsByTagName("description"); $tnl = $tnl->item(0); $description = $tnl->firstChild->textContent; $y["title"] = $title; $y["link"] = $link; $y["date"] = $date; $y["description"] = $description; $y["type"] = $type; return $y; } function RSS_Channel($channel) {global $RSS_Content; $items = $channel->getElementsByTagName("item"); $y = RSS_Tags($channel, 0); array_push($RSS_Content, $y); foreach($items as $item) {$y = RSS_Tags($item, 1); array_push($RSS_Content, $y); } } function RSS_Retrieve($url) {global $RSS_Content; if ( !class_exists('DOMDocument') ) {echo "DOMDocument does not exist, failed to load RSS."; return; } $doc = new DOMDocument(); $doc->load($url); $channels = $doc->getElementsByTagName("channel"); $RSS_Content = array(); foreach($channels as $channel) {RSS_Channel($channel); } } function RSS_RetrieveLinks($url) {global $RSS_Content; $doc = new DOMDocument(); $doc->load($url); $channels = $doc->getElementsByTagName("channel"); $RSS_Content = array(); foreach($channels as $channel) {$items = $channel->getElementsByTagName("item"); foreach($items as $item) {$y = RSS_Tags($item, 1); array_push($RSS_Content, $y); } } } function RSS_Links($url, $size = 15) {global $RSS_Content; $page = "<ul>"; RSS_RetrieveLinks($url); if($size > 0) $recents = array_slice($RSS_Content, 0, $size + 1); foreach($recents as $article) {$type = $article["type"]; if($type == 0) continue; $title = $article["title"]; $link = $article["link"]; $page .= "<li><a href='\$link\>$title</a></li>\n;' } $page .="</ul>\n"; return $page; } function RSS_Display($url, $size = 15, $site = 0, $withdate = 0) {global $RSS_Content; $opened = false; $page = ""; $site = (intval($site) == 0) ? 1 : 0; RSS_Retrieve($url); if($size > 0) $recents = array_slice($RSS_Content, $site, $size + 1 - $site); $i = 0; $page .= "<table cellspacing=\"0\" cellpadding=\"0\">"; foreach($recents as $article) {$title = $article["title"]; $link = $article["link"]; if (strlen($title) > 50) {$title = substr($title,0,50); $title .= '..'; } $date = $article["date"]; $page .= "<tr> <td class=\"title\"> <a target=\"_blank\" href=\"$link\">" . substr($title,0, 30) . " </a> </td> <td class=\"time\"> ".strftime("%d/%m/%Y",strtotime($date))."</td> </tr>"; } $page .= "</table>"; if($opened == true) {$page .="\n"; $page .="\n"; } return $page."\n"; } ?> [18-May-2016 16:02:26 Asia/Hong_Kong] PHP Notice: Undefined offset: 1 in /home/anci/public_html/themes/default/main/index.php on line 20 <?php if (!defined('FLUX_ROOT')) exit; ?><div class="indexPage"> <div class="indexTop"> <div class="newsArea"> <h2><?php echo $EADev['serverName']; ?> News Board</h2> <?php if ( $EADev['enablerss'] ): require_once("rsslib.php"); echo RSS_Display($EADev['news'], 5); endif; ?> </div> <div class="sliderArea"> <div> <div id="sliderShow"> <?php foreach ($EADev['sliders'] as $sliders ) { $slider = explode(",", $sliders); ?> <div> <img src="<?php echo $this->themePath('img/' . $slider[0]); ?>" alt="" /> <p> <?php echo $slider[1]; ?> </p> </div> <?php } ?> </div> </div> </div> <div class="clear"></div> </div> <div class="indexBottom"> <div class="videoArea"> <?php echo $EADev['youtube-video']; ?> </div> <div class="woeSchdArea"> <div class="woeSchd">
0 Akkarin Posted June 7, 2016 Posted June 7, 2016 Speak to the person who designed your theme. That file isn't included within rA's distribution of FluxCP.
Question
undeadrex
I'm seeing this 2 error in my Flux CP error_log
Can someone help me with this problem? it's spamming my disk space every 1 minute >.<
[18-May-2016 16:02:26 Asia/Hong_Kong] PHP Notice: Trying to get property of non-object in /home/anci/public_html/themes/default/main/rsslib.php on line 1
[18-May-2016 16:02:26 Asia/Hong_Kong] PHP Notice: Undefined offset: 1 in /home/anci/public_html/themes/default/main/index.php on line 20
1 answer to this question
Recommended Posts