mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 11:50:30 +02:00
Extra checks on returned data
This commit is contained in:
@@ -11,8 +11,8 @@
|
|||||||
| GNU General Public License (http://gnu.org).
|
| GNU General Public License (http://gnu.org).
|
||||||
|
|
|
|
||||||
| $Source: /cvs_backup/e107_0.8/e107_plugins/forum/forum_post.php,v $
|
| $Source: /cvs_backup/e107_0.8/e107_plugins/forum/forum_post.php,v $
|
||||||
| $Revision: 1.5 $
|
| $Revision: 1.6 $
|
||||||
| $Date: 2007-05-28 15:17:13 $
|
| $Date: 2007-05-28 20:36:15 $
|
||||||
| $Author: e107steved $
|
| $Author: e107steved $
|
||||||
+----------------------------------------------------------------------------+
|
+----------------------------------------------------------------------------+
|
||||||
*/
|
*/
|
||||||
@@ -44,7 +44,14 @@ if ($action == 'rp')
|
|||||||
{
|
{
|
||||||
// reply to thread
|
// reply to thread
|
||||||
$thread_info = $forum->thread_get($id, 'last', 11);
|
$thread_info = $forum->thread_get($id, 'last', 11);
|
||||||
$forum_info = $forum->forum_get($thread_info['head']['thread_forum_id']);
|
if (!is_array($thread_info) || !count($thread_info))
|
||||||
|
{
|
||||||
|
$forum_info = FALSE; // Someone fed us a dud forum id - should exist if replying
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$forum_info = $forum->forum_get($thread_info['head']['thread_forum_id']);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
elseif ($action == 'nt')
|
elseif ($action == 'nt')
|
||||||
{
|
{
|
||||||
@@ -61,7 +68,7 @@ elseif ($action == 'quote' || $action == 'edit')
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!check_class($forum_info['forum_postclass']) || !check_class($forum_info['parent_postclass'])) {
|
if (($forum_info === FALSE) || !check_class($forum_info['forum_postclass']) || !check_class($forum_info['parent_postclass'])) {
|
||||||
require_once(HEADERF);
|
require_once(HEADERF);
|
||||||
$ns->tablerender(LAN_20, "<div style='text-align:center'>".LAN_399."</div>");
|
$ns->tablerender(LAN_20, "<div style='text-align:center'>".LAN_399."</div>");
|
||||||
require_once(FOOTERF);
|
require_once(FOOTERF);
|
||||||
|
Reference in New Issue
Block a user