Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions libraries/joomla/database/driver/mysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,12 +154,12 @@ public function escape($text, $extra = false)
if (is_float($text))
{
// Force the dot as a decimal point.
return str_replace(',', '.', $text);
return str_replace(',', '.', (string) $text);
}

$this->connect();

$result = mysql_real_escape_string($text, $this->getConnection());
$result = mysql_real_escape_string((string) $text, $this->getConnection());

if ($extra)
{
Expand Down
4 changes: 2 additions & 2 deletions libraries/joomla/database/driver/mysqli.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,12 +246,12 @@ public function escape($text, $extra = false)
if (is_float($text))
{
// Force the dot as a decimal point.
return str_replace(',', '.', $text);
return str_replace(',', '.', (string) $text);
}

$this->connect();

$result = mysqli_real_escape_string($this->getConnection(), $text);
$result = mysqli_real_escape_string($this->getConnection(), (string) $text);

if ($extra)
{
Expand Down
4 changes: 2 additions & 2 deletions libraries/joomla/database/driver/pdo.php
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,10 @@ public function escape($text, $extra = false)
if (is_float($text))
{
// Force the dot as a decimal point.
return str_replace(',', '.', $text);
return str_replace(',', '.', (string) $text);
}

$text = str_replace("'", "''", $text);
$text = str_replace("'", "''", (string) $text);

return addcslashes($text, "\000\n\r\\\032");
}
Expand Down
2 changes: 1 addition & 1 deletion libraries/joomla/database/driver/pdomysql.php
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ public function escape($text, $extra = false)
if (is_float($text))
{
// Force the dot as a decimal point.
return str_replace(',', '.', $text);
return str_replace(',', '.', (string) $text);
}

$this->connect();
Expand Down
4 changes: 2 additions & 2 deletions libraries/joomla/database/driver/postgresql.php
Original file line number Diff line number Diff line change
Expand Up @@ -212,12 +212,12 @@ public function escape($text, $extra = false)
if (is_float($text))
{
// Force the dot as a decimal point.
return str_replace(',', '.', $text);
return str_replace(',', '.', (string) $text);
}

$this->connect();

$result = pg_escape_string($this->connection, $text);
$result = pg_escape_string($this->connection, (string) $text);

if ($extra)
{
Expand Down