Reply to Fatal error problem

Your name:

Reply:


Posted by StofaNet on 12/30/06 13:34

I got a message: "Fatal error: Cannot access empty property in
/usr/home/web/*my username*/includes/portal_rss.php on line 22"

This is the file, but I can΄t figure it out - Maybe you can help me ?

Thanks

<?php
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}


// Portal block #1
$sql = "SELECT * FROM ".RSS_TABLE."
WHERE rss_location = 3
AND rss_enable = 1";

if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not query RSS news information",
"", __LINE__, __FILE__, $sql);
}

$rss_rows = array();
$row = $db->sql_fetchrow($result);

$rss = new rss();
$rss->$items_limit = $row['rss_limit'];
$rss_items = $rss->Get($row['rss_url']);

if($rss_items['items_count'] != 0)
{
$template->assign_block_vars("rss_block1", array());
}

$max_rss = ($rss_items['items_count'] < $row['rss_limit']) ?
$rss_items['items_count'] : $row['rss_limit'];
for($i=0;$i<$max_rss;$i++)
{
$template->assign_block_vars("rss_block1.rss_portal", array(
'RSS_ARTC_TITLE' => "<a
href=\"".$rss_items['items'][$i]['link']."\"
target=\"_child\">".$rss_items['items'][$i]['title']."</a>",
'RSS_ARTC_TIME' =>
$rss_items['items'][$i]['date'],
)
);
}


// Portal block #2
$sql = "SELECT * FROM ".RSS_TABLE."
WHERE rss_location = 4
AND rss_enable = 1";

if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Could not query RSS news information",
"", __LINE__, __FILE__, $sql);
}

$row1 = $db->sql_fetchrow($result);

$rss1 = new rss();
$rss1->$items_limit = $row1['rss_limit'];
$rss_items1 = $rss1->Get($row1['rss_url']);

if($rss_items1['items_count'] != 0)
{
$template->assign_block_vars("rss_block2", array());
}

$max_rss1 = ($rss_items1['items_count'] < $row1['rss_limit']) ?
$rss_items1['items_count'] : $row1['rss_limit'];
for($i=0;$i<$max_rss1;$i++)
{
$template->assign_block_vars("rss_block2.rss_portal2", array(
'RSS_ARTC_TITLE' => "<a
href=\"".$rss_items1['items'][$i]['link']."\"
target=\"_child\">".$rss_items1['items'][$i]['title']."</a>",
'RSS_ARTC_TIME' =>
$rss_items1['items'][$i]['date'],
)
);
}
?>

[Back to original message]


УдалСнная Ρ€Π°Π±ΠΎΡ‚Π° для программистов  •  Как Π·Π°Ρ€Π°Π±ΠΎΡ‚Π°Ρ‚ΡŒ Π½Π° Google AdSense  •  England, UK  •  ΡΡ‚Π°Ρ‚ΡŒΠΈ Π½Π° английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Π‘Π°ΠΉΡ‚ ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ Π² Π‘Ρ‚ΡƒΠ΄ΠΈΠΈ Π’Π°Π»Π΅Π½Ρ‚ΠΈΠ½Π° ΠŸΠ΅Ρ‚Ρ€ΡƒΡ‡Π΅ΠΊΠ°
ΠΈΠ·Π³ΠΎΡ‚ΠΎΠ²Π»Π΅Π½ΠΈΠ΅ ΠΈ ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠ° Π²Π΅Π±-сайтов, Ρ€Π°Π·Ρ€Π°Π±ΠΎΡ‚ΠΊΠ° ΠΏΡ€ΠΎΠ³Ρ€Π°ΠΌΠΌΠ½ΠΎΠ³ΠΎ обСспСчСния, поисковая оптимизация