0
0
Fork 0
mirror of https://github.com/nextcloud/server.git synced 2025-01-15 23:59:16 +00:00
nextcloud_server/lib/private/DB/BacktraceDebugStack.php
Andy Scherzinger dae7c159f7
chore: Add SPDX header
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
2024-05-24 13:11:22 +02:00

20 lines
585 B
PHP

<?php
declare(strict_types=1);
/**
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
namespace OC\DB;
use Doctrine\DBAL\Logging\DebugStack;
class BacktraceDebugStack extends DebugStack {
public function startQuery($sql, ?array $params = null, ?array $types = null) {
parent::startQuery($sql, $params, $types);
$backtrace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);
$this->queries[$this->currentQuery]['backtrace'] = $backtrace;
$this->queries[$this->currentQuery]['start'] = $this->start;
}
}