aboutsummaryrefslogtreecommitdiff
path: root/lib/classes/Debug/TraceableStudipPDO.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/classes/Debug/TraceableStudipPDO.php')
-rw-r--r--lib/classes/Debug/TraceableStudipPDO.php24
1 files changed, 24 insertions, 0 deletions
diff --git a/lib/classes/Debug/TraceableStudipPDO.php b/lib/classes/Debug/TraceableStudipPDO.php
new file mode 100644
index 0000000..6100c22
--- /dev/null
+++ b/lib/classes/Debug/TraceableStudipPDO.php
@@ -0,0 +1,24 @@
+<?php
+namespace Studip\Debug;
+
+use DebugBar\DataCollector\PDO\TraceablePDO;
+
+final class TraceableStudipPDO extends TraceablePDO
+{
+ /**
+ * Quotes a string for use in a query.
+ *
+ * @link http://php.net/manual/en/pdo.quote.php
+ * @param string $string The string to be quoted.
+ * @param int $parameter_type [optional] Provides a data type hint for drivers that have
+ * alternate quoting styles.
+ * @return string|bool A quoted string that is theoretically safe to pass into an SQL statement.
+ * Returns FALSE if the driver does not support quoting in this way.
+ */
+ #[\ReturnTypeWillChange]
+ public function quote($string, $parameter_type = null)
+ {
+ return $this->pdo->quote($string, $parameter_type);
+ }
+
+}