Skip to content

Commit

Permalink
Need to quote data values, tweak query building
Browse files Browse the repository at this point in the history
  • Loading branch information
mbabker committed Feb 22, 2015
1 parent fe839a0 commit 2beee89
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -340,12 +340,15 @@ public function requestFromGithub()
{
// Build the data object to store in the database
$pullData = array($pull->number, $pull->title, $pull->body, $pull->html_url);
$data[] = implode($pullData, ',');
$data[] = implode($this->getDb()->quote($pullData), ',');
}

$query = $this->getDb()->getQuery();
$query->insert('#__patchtester_pulls')->columns('pull_id, title, description, pull_url')->values($data);
$this->getDb()->setQuery($query);
$this->getDb()->setQuery(
$this->db->getQuery(true)
->insert('#__patchtester_pulls')
->columns('pull_id, title, description, pull_url')
->values($data)
);

try
{
Expand Down

0 comments on commit 2beee89

Please sign in to comment.