Skip to content

Commit 2bfda40

Browse files
authored
Merge pull request #5 from richard67/3.10-dev-beat-patch-16-mod-1
[CMS PR 36787] Fix also the other db drivers
2 parents a807845 + cf03218 commit 2bfda40

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

libraries/joomla/database/driver/mysql.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,12 +154,12 @@ public function escape($text, $extra = false)
154154
if (is_float($text))
155155
{
156156
// Force the dot as a decimal point.
157-
return str_replace(',', '.', $text);
157+
return str_replace(',', '.', (string) $text);
158158
}
159159

160160
$this->connect();
161161

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

164164
if ($extra)
165165
{

libraries/joomla/database/driver/pdo.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,10 +349,10 @@ public function escape($text, $extra = false)
349349
if (is_float($text))
350350
{
351351
// Force the dot as a decimal point.
352-
return str_replace(',', '.', $text);
352+
return str_replace(',', '.', (string) $text);
353353
}
354354

355-
$text = str_replace("'", "''", $text);
355+
$text = str_replace("'", "''", (string) $text);
356356

357357
return addcslashes($text, "\000\n\r\\\032");
358358
}

libraries/joomla/database/driver/pdomysql.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -464,7 +464,7 @@ public function escape($text, $extra = false)
464464
if (is_float($text))
465465
{
466466
// Force the dot as a decimal point.
467-
return str_replace(',', '.', $text);
467+
return str_replace(',', '.', (string) $text);
468468
}
469469

470470
$this->connect();

libraries/joomla/database/driver/postgresql.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,12 +212,12 @@ public function escape($text, $extra = false)
212212
if (is_float($text))
213213
{
214214
// Force the dot as a decimal point.
215-
return str_replace(',', '.', $text);
215+
return str_replace(',', '.', (string) $text);
216216
}
217217

218218
$this->connect();
219219

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

222222
if ($extra)
223223
{

0 commit comments

Comments
 (0)