Skip to content

Commit

Permalink
Fixed E_NOTICE error
Browse files Browse the repository at this point in the history
  • Loading branch information
eSilverStrike committed Jan 12, 2022
1 parent 3cd534e commit 97cafe7
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions system/classes/article.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -952,11 +952,13 @@ public function loadFromArgsArray(array &$array)
}

// Load up the topic name and icon
$topic = DB_query("SELECT tid, topic, imageurl FROM {$_TABLES['topics']} WHERE tid='" . TOPIC_getTopicDefault('topic') . "'");
$topic = DB_fetchArray($topic);
$this->_tid = $topic['tid'];
$this->_topic = $topic['topic'];
$this->_imageurl = $topic['imageurl'];
$result = DB_query("SELECT tid, topic, imageurl FROM {$_TABLES['topics']} WHERE tid='" . TOPIC_getTopicDefault('topic') . "'");
if ($result && (DB_numRows($result) > 0)) {
$topic = DB_fetchArray($result);
$this->_tid = $topic['tid'];
$this->_topic = $topic['topic'];
$this->_imageurl = $topic['imageurl'];
}

// Load the title, page title
$this->_title = $this->_applyTitleFilter($array['title']);
Expand Down

0 comments on commit 97cafe7

Please sign in to comment.