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

Entries logs are not json, but decoded #1

Open
duranto2009 opened this issue Jan 1, 2021 · 0 comments
Open

Entries logs are not json, but decoded #1

duranto2009 opened this issue Jan 1, 2021 · 0 comments

Comments

@duranto2009
Copy link

../application/views/logs/home.php on line 80

			$logBeforeInfo = "[".$log["logBefore"]."]";
			$logAfterInfo  = "[".$log["logAfter"]."]";
			$logBeforeInfo = json_decode($logBeforeInfo, true)[0];
			$logAfterInfo  = json_decode($logAfterInfo, true)[0];

The logType 'entries' is integer or string, so skip the decoding.

			if($log['logType'] === 'entries'){
				$logBeforeInfo = $log["logBefore"];
				$logAfterInfo  = $log["logAfter"];
			} else {
				$logBeforeInfo = "[".$log["logBefore"]."]";
				$logAfterInfo  = "[".$log["logAfter"]."]";
				$logBeforeInfo = json_decode($logBeforeInfo, true)[0];
				$logAfterInfo  = json_decode($logAfterInfo, true)[0];
			}
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