Skip to content

Commit

Permalink
Fixed quotes
Browse files Browse the repository at this point in the history
  • Loading branch information
bashkarev committed Jun 16, 2017
1 parent f960cc1 commit 313aa5d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function quoteValue($str)
if (!is_string($str)) {
return $str;
}
return "'" . addcslashes(str_replace("'", "''", $str), "\000\n\r\\\032") . "'";
return "'" . addcslashes($str, "\000\n\r\\\032\047") . "'";
}

/**
Expand Down
2 changes: 1 addition & 1 deletion tests/ConnectionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public function testQuoteValue()
$connection = $this->getConnection(false);
$this->assertEquals(123, $connection->quoteValue(123));
$this->assertEquals("'string'", $connection->quoteValue('string'));
//$this->assertEquals("'It\\'s interesting'", $connection->quoteValue("It's interesting")); toDo
$this->assertEquals("'It\\'s interesting'", $connection->quoteValue("It's interesting"));
}

public function testQuoteTableName()
Expand Down

0 comments on commit 313aa5d

Please sign in to comment.