Skip to content

Commit c5c9bf4

Browse files
committed
Fix some PHP notices in TD.php
1 parent 31f0d25 commit c5c9bf4

File tree

5 files changed

+6
-8
lines changed

5 files changed

+6
-8
lines changed

TracyDebugger.module

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class TracyDebugger extends WireData implements Module, ConfigurableModule {
3232
'summary' => __('Tracy debugger from Nette with several PW specific custom tools.', __FILE__),
3333
'author' => 'Adrian Jones',
3434
'href' => 'https://processwire.com/talk/topic/12208-tracy-debugger/',
35-
'version' => '4.10.20',
35+
'version' => '4.10.21',
3636
'autoload' => true,
3737
'singular' => true,
3838
'requires' => 'ProcessWire>=2.7.2, PHP>=5.4.4',

includes/TD.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ public static function barDumpBig($var, $title = NULL) {
5555
$options = $title;
5656
$title = NULL;
5757
}
58-
if(is_array($options) && !static::has_string_keys($options)) {
58+
if(isset($options) && is_array($options) && !static::has_string_keys($options)) {
5959
$options['maxDepth'] = $options[0];
6060
if(isset($options[1])) $options['maxLength'] = $options[1];
6161
}
@@ -76,7 +76,7 @@ public static function barDump($var, $title = NULL, array $options = NULL) {
7676
$options = $title;
7777
$title = NULL;
7878
}
79-
if(is_array($options) && !static::has_string_keys($options)) {
79+
if(isset($options) && is_array($options) && !static::has_string_keys($options)) {
8080
$options['maxDepth'] = $options[0];
8181
if(isset($options[1])) $options['maxLength'] = $options[1];
8282
}
@@ -114,7 +114,7 @@ public static function dump($var, $title = NULL, array $options = NULL, $return
114114
$options = $title;
115115
$title = NULL;
116116
}
117-
if(is_array($options) && !static::has_string_keys($options)) {
117+
if(isset($options) && is_array($options) && !static::has_string_keys($options)) {
118118
$options['maxDepth'] = $options[0];
119119
if(isset($options[1])) $options['maxLength'] = $options[1];
120120
}

tracy-master/src/Tracy/Debugger.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*/
1616
class Debugger
1717
{
18-
const VERSION = '2.5-dev';
18+
const VERSION = '2.5.0';
1919

2020
/** server modes for Debugger::enable() */
2121
const

tracy-master/src/Tracy/Dumper.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
namespace Tracy;
99

1010

11-
1211
/**
1312
* Dumps a variable.
1413
*/
@@ -238,7 +237,7 @@ private static function dumpObject(&$var, $options, $level)
238237
$editorAttributes = '';
239238
if ($options[self::LOCATION] & self::LOCATION_CLASS) {
240239
$rc = $var instanceof \Closure ? new \ReflectionFunction($var) : new \ReflectionClass($var);
241-
$editor = Helpers::editorUri($rc->getFileName(), $rc->getStartLine());
240+
$editor = $rc->getFileName() ? Helpers::editorUri($rc->getFileName(), $rc->getStartLine()) : null;
242241
if ($editor) {
243242
$editorAttributes = Helpers::formatHtml(
244243
' title="Declared in file % on line %" data-tracy-href="%"',

tracy-master/src/Tracy/FireLogger.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
namespace Tracy;
99

1010

11-
1211
/**
1312
* FireLogger console logger.
1413
*

0 commit comments

Comments
 (0)