Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TypeError: ini_set() #457

Closed
hamtil opened this issue Jan 18, 2021 · 0 comments
Closed

TypeError: ini_set() #457

hamtil opened this issue Jan 18, 2021 · 0 comments

Comments

@hamtil
Copy link

hamtil commented Jan 18, 2021

Version: 2.8.1

Bug Description

TypeError: ini_set() expects parameter 2 to be string, boolean given in /home/users/kulinarstvi/kulinarskeumeni.cz/web/new/vendor/tracy/tracy/src/Tracy/Dumper/Renderer.php:458

public static function jsonEncode($snapshot): string
{
	$old = @ini_set('serialize_precision', '-1'); // @ may be disabled
	try {
		return json_encode($snapshot, JSON_HEX_APOS | JSON_HEX_AMP | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES);
	} finally {
		@ini_set('serialize_precision', $old); // @ may be disabled
	}
}

Steps To Reproduce

$old = @ini_set('serialize_precision', '-1'); //return false

Expected Behavior

No TypeError

Possible Solution

@ini_set('serialize_precision', $old.''); or better

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant