From c29ae0636f06149444b8cae3bcd090c366681875 Mon Sep 17 00:00:00 2001 From: David Grudl Date: Wed, 20 May 2015 16:36:25 +0200 Subject: [PATCH] removed support for PHP 5.3 --- src/Bridges/DatabaseTracy/ConnectionPanel.php | 2 +- src/Database/Helpers.php | 2 +- src/Database/Table/Selection.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Bridges/DatabaseTracy/ConnectionPanel.php b/src/Bridges/DatabaseTracy/ConnectionPanel.php index f66400265..1b409bbb8 100644 --- a/src/Bridges/DatabaseTracy/ConnectionPanel.php +++ b/src/Bridges/DatabaseTracy/ConnectionPanel.php @@ -55,7 +55,7 @@ public function logQuery(Nette\Database\Connection $connection, $result) $this->count++; $source = NULL; - $trace = $result instanceof \PDOException ? $result->getTrace() : debug_backtrace(PHP_VERSION_ID >= 50306 ? DEBUG_BACKTRACE_IGNORE_ARGS : FALSE); + $trace = $result instanceof \PDOException ? $result->getTrace() : debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); foreach ($trace as $row) { if (isset($row['file']) && is_file($row['file']) && !Tracy\Debugger::getBluescreen()->isCollapsed($row['file'])) { if ((isset($row['function']) && strpos($row['function'], 'call_user_func') === 0) diff --git a/src/Database/Helpers.php b/src/Database/Helpers.php index 2a53f381a..4156519eb 100644 --- a/src/Database/Helpers.php +++ b/src/Database/Helpers.php @@ -120,7 +120,7 @@ public static function dumpSql($sql, array $params = NULL, Connection $connectio } elseif (is_string($param)) { $length = Nette\Utils\Strings::length($param); - $truncated = Nette\Utils\Strings::truncate($param, Helpers::$maxLength); + $truncated = Nette\Utils\Strings::truncate($param, self::$maxLength); $text = htmlspecialchars($connection ? $connection->quote($truncated) : '\'' . $truncated . '\'', ENT_NOQUOTES, 'UTF-8'); return '' . $text . ''; diff --git a/src/Database/Table/Selection.php b/src/Database/Table/Selection.php index 668021d07..01d61b19a 100644 --- a/src/Database/Table/Selection.php +++ b/src/Database/Table/Selection.php @@ -610,7 +610,7 @@ protected function getGeneralCacheKey() $key = [__CLASS__, $this->name, $this->sqlBuilder->getConditions()]; if (!$this->generalCacheTraceKey) { $trace = []; - foreach (debug_backtrace(PHP_VERSION_ID >= 50306 ? DEBUG_BACKTRACE_IGNORE_ARGS : FALSE) as $item) { + foreach (debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS) as $item) { $trace[] = isset($item['file'], $item['line']) ? $item['file'] . $item['line'] : NULL; }; $this->generalCacheTraceKey = $trace;