Skip to content

Commit

Permalink
Merge pull request #214 from UIUCLibrary/issue-213
Browse files Browse the repository at this point in the history
Always instantiate empty array for variables passed to implode()
  • Loading branch information
craigdietrich authored Jun 9, 2023
2 parents f173c41 + 16d4234 commit 83792e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions system/application/models/book_model.php
Original file line number Diff line number Diff line change
Expand Up @@ -738,8 +738,8 @@ public function save($array=array()) {
$this->db->join($this->books_table, $this->pages_table.'.book_id='.$this->books_table.'.book_id');
$this->db->where($this->books_table.'.book_id', $book_id);
$query = $this->db->get();
$book_version_ids = array();
if ($query->num_rows()) {
$book_version_ids = array();
$result = $query->result();
foreach ($result as $row) $book_version_ids[] = $row->version_id;
}
Expand All @@ -749,8 +749,8 @@ public function save($array=array()) {
$this->db->join($this->books_table, $this->pages_table.'.book_id='.$this->books_table.'.book_id');
$this->db->where($this->books_table.'.book_id', $book_id);
$query = $this->db->get();
$book_page_ids = array();
if ($query->num_rows()) {
$book_page_ids = array();
$result = $query->result();
foreach ($result as $row) $book_page_ids[] = $row->content_id;
}
Expand Down

0 comments on commit 83792e8

Please sign in to comment.