Skip to content

Commit

Permalink
removed support for PHP 5.3
Browse files Browse the repository at this point in the history
  • Loading branch information
dg committed May 21, 2015
1 parent 9ff0956 commit 1801e2e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Bridges/DatabaseTracy/ConnectionPanel.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/Database/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 '<span title="Length ' . $length . ' characters">' . $text . '</span>';

Expand Down
2 changes: 1 addition & 1 deletion src/Database/Table/Selection.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1801e2e

Please sign in to comment.