diff options
| author | Philipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de> | 2024-09-24 10:53:31 +0200 |
|---|---|---|
| committer | Philipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de> | 2024-09-24 10:53:31 +0200 |
| commit | 4459dd7917f4d1c34f40bb68f0e991e9c3d53e4c (patch) | |
| tree | 5c07151ae61276d334e88f6309c30d439a85c12e /lib/classes/Debug/TraceableStudipPDO.php | |
| parent | da0022e5c1abbf9825ae76debaabdff7e8623bb4 (diff) | |
| parent | 97a188592c679890a25c37ab78463add76a52ff7 (diff) | |
Merge branch 'main' into issue-3911issue-3911
Diffstat (limited to 'lib/classes/Debug/TraceableStudipPDO.php')
| -rw-r--r-- | lib/classes/Debug/TraceableStudipPDO.php | 24 |
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); + } + +} |
