diff --git a/src/Tracy/Dumper.php b/src/Tracy/Dumper.php index e0f973afd..1a1c9e810 100644 --- a/src/Tracy/Dumper.php +++ b/src/Tracy/Dumper.php @@ -175,7 +175,7 @@ private static function dumpDouble(&$var): string { $var = is_finite($var) ? ($tmp = json_encode($var)) . (strpos($tmp, '.') === false ? '.0' : '') - : str_replace('.0', '', var_export($var, true)); // workaround for PHP 7.0.2 + : var_export($var, true); return "$var\n"; } diff --git a/tests/Tracy/Debugger.E_ERROR.console.phpt b/tests/Tracy/Debugger.E_ERROR.console.phpt index 6c9ee492d..83b0cfa4a 100644 --- a/tests/Tracy/Debugger.E_ERROR.console.phpt +++ b/tests/Tracy/Debugger.E_ERROR.console.phpt @@ -26,7 +26,7 @@ $onFatalErrorCalled = false; register_shutdown_function(function () use (&$onFatalErrorCalled) { Assert::true($onFatalErrorCalled); - Assert::match(PHP_MAJOR_VERSION > 5 ? + Assert::match( "Error: Call to undefined function missing_function() in %a% Stack trace: #0 %a%: third(Array) @@ -34,23 +34,7 @@ Stack trace: #2 %a%: first(10, 'any string') #3 {main} Unable to log error: Logging directory is not specified. -" : (extension_loaded('xdebug') ? ' -Fatal error: Call to undefined function missing_function() in %a% -ErrorException: Call to undefined function missing_function() in %a% -Stack trace: -#0 %a%: third() -#1 %a%: second() -#2 %a%: first() -#3 {main} -Unable to log error: Logging directory is not specified. -' : ' -Fatal error: Call to undefined function missing_function() in %a% -ErrorException: Call to undefined function missing_function() in %a% -Stack trace: -#0 [internal function]: Tracy\\Debugger::shutdownHandler() -#1 {main} -Unable to log error: Logging directory is not specified. -'), ob_get_clean()); +", ob_get_clean()); echo 'OK!'; // prevents PHP bug #62725 }); diff --git a/tests/Tracy/Debugger.E_ERROR.html.phpt b/tests/Tracy/Debugger.E_ERROR.html.phpt index c830984c6..d5afd7e03 100644 --- a/tests/Tracy/Debugger.E_ERROR.html.phpt +++ b/tests/Tracy/Debugger.E_ERROR.html.phpt @@ -33,7 +33,7 @@ register_shutdown_function(function () use (&$onFatalErrorCalled) { Assert::true($onFatalErrorCalled); $output = ob_get_clean(); Assert::same(1, substr_count($output, ' - - - - - - - Fatal Error: Call to undefined function missing_function() - - %A% - - - - -
- -
-
-

Fatal Error

- -

Call to undefined function missing_function() - search► -

-
- - - - - - - - - -
-

Source file

- -
-

File: %a%

-
%d%: -%d%: -%d%: function second($arg1, $arg2) -%d%: { -%d%: third([1, 2, 3]); -%d%: } -%d%: -%d%: -%d%: function third($arg1) -%d%: { -%d%: missing_function(); -%d%: } -%d%: -%d%: -%d%: first(10, 'any string'); -
- - - - - - - -
-

Exception

-
-

-		
- - - - - - -
-

Environment

- -
-

$_SERVER

-
- %A%
-
- - -

$_SESSION

-
%A%
- - - - -

Constants

-
- %A%
-
- - -

Configuration options

-
- %A%
-
- - -
-

HTTP request

- -
-%A% -

$_GET

-

empty

-

$_POST

-

empty

-

$_COOKIE

-

empty

-
- - -
-

HTTP response

- -
-

Headers

-
%A%
-
- - - - - - - -
-
- - - - - -%A%%A% diff --git a/tests/Tracy/expected/Debugger.E_ERROR.html.xdebug.expect b/tests/Tracy/expected/Debugger.E_ERROR.html.xdebug.expect deleted file mode 100644 index 226208cd1..000000000 --- a/tests/Tracy/expected/Debugger.E_ERROR.html.xdebug.expect +++ /dev/null @@ -1,208 +0,0 @@ - -Fatal error: Call to undefined function missing_function() in %a% on line %d% - - - - - - - - Fatal Error: Call to undefined function missing_function() - - %A% - - - - -
- -
-
-

Fatal Error

- -

Call to undefined function missing_function() - search► -

-
- - - - - - - - - -
-

Source file

- -
-

File: %a%

-
%d%: -%d%: -%d%: function second($arg1, $arg2) -%d%: { -%d%: third([1, 2, 3]); -%d%: } -%d%: -%d%: -%d%: function third($arg1) -%d%: { -%d%: missing_function(); -%d%: } -%d%: -%d%: -%d%: first(10, 'any string'); -
- - -
-

Call stack

- -
-
    -
  1. - - %a% - source  - third() -

    - -
    %d%: -%d%: -%d%: function first($arg1, $arg2) -%d%: { -%d%: second(true, false); -%d%: } -%d%: -%d%: -%d%: function second($arg1, $arg2) -%d%: { -%d%: third([1, 2, 3]); -%d%: } -%d%: -%d%: -%d%: function third($arg1) -
    - - -
  2. -
  3. - - %a% - source  - second() -

    - -
    %d%:%A%
    - - -
  4. -
  5. - - %a% - source  - first() -

    - -
    %d%: third([1, 2, 3]); -%d%: } -%d%: -%d%: -%d%: function third($arg1) -%d%: { -%d%: missing_function(); -%d%: } -%d%: -%d%: -%d%: first(10, 'any string'); -%d%: -
    - - -
  6. -
-
- - - - - -
-

Exception

-
-

-		
- - - - - - -
-

Environment

- -
-

$_SERVER

-
- %A%
-
- - -

$_SESSION

-
%A%
- - - - -

Constants

-
- %A%
-
- - -

Configuration options

-
- %A%
-
- - -
-

HTTP request

- -
-%A% -

$_GET

-

empty

-

$_POST

-

empty

-

$_COOKIE

-

empty

-
- - -
-

HTTP response

- -
-

Headers

-
%A%
-
- - - - -
    -
  • Report generated at %a%
  • -
  • CLI%a?%
  • -
  • PHP %a%
- - -
-
- - - - - -%A%%A% diff --git a/tests/Tracy/expected/Debugger.scream.expect b/tests/Tracy/expected/Debugger.scream.expect index 8adc0fd09..db3de6c92 100644 --- a/tests/Tracy/expected/Debugger.scream.expect +++ b/tests/Tracy/expected/Debugger.scream.expect @@ -1,7 +1,5 @@ -%a%: mktime(): You should be using the time() function instead in %a% on line %d% - -Deprecated: mktime(): %a% +Deprecated: mktime(): You should be using the time() function instead in %a% on line %d% Notice: Undefined variable: x in %a% on line %d%