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

BUG doesnt work in CLI context #177

Open
mhsdesign opened this issue Aug 16, 2023 · 2 comments
Open

BUG doesnt work in CLI context #177

mhsdesign opened this issue Aug 16, 2023 · 2 comments

Comments

@mhsdesign
Copy link

round(): Argument #1 ($num) must be of type int|float, null given

  Type: TypeError
  File: Data/Temporary/Production/Cache/Code/Flow_Object_Classes/
        t3n_Neos_Debug_Aspect_CollectDebugInformationAspect.php
  Line: 95

but @Sebobo and me looked at the code and couldnt make sense of it why it can ever be null.

Instead we disabled the plugin in production mode ^^

(so this can be closed)

@Sebobo
Copy link
Collaborator

Sebobo commented Aug 16, 2023

No this is not true, my change only affects the rendering of the HTML output. This class is still called as the timing headers are added to the response. Meaning we still have to investigate.

@mhsdesign
Copy link
Author

the actual error is actually

Warning: Attempt to read property "executionTime" on null in t3n_Neos_Debug_Aspect_CollectDebugInformationAspect.php line 96

that means that

$sqlExecutionTime = round($this->sqlLoggingStack->executionTime, 2);
sqlLoggingStack is null.

This happened in our case because the fusion rendering was triggered from CLI and

$this->sqlLoggingStack = new DebugStack();
will never be triggered as we are not in a web-request.

@mhsdesign mhsdesign changed the title TypeError round in CollectDebugInformationAspect Doesnt work in CLI context Aug 17, 2023
@mhsdesign mhsdesign changed the title Doesnt work in CLI context BUG doesnt work in CLI context Aug 17, 2023
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

2 participants