Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fixed profiler report under an exception of a sub-request #3609

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

Closed
wants to merge 2 commits into from
Closed

Fixed profiler report under an exception of a sub-request #3609

wants to merge 2 commits into from

Conversation

guilhermeblanco
Copy link
Contributor

When a sub-request contains an exception, PdoProfilerStorage was entering in an infinite loop.
Fixed by preventing the read/createProfileFromData recursion.

@@ -198,7 +198,8 @@ protected function createProfileFromData($token, $data, $parent = null)
$profile->setTime($data['time']);
$profile->setCollectors(unserialize(base64_decode($data['data'])));

if (!$parent && !empty($data['parent'])) {
// Under sub-requests, $data['parent'] === $token in an exception situation
if ( ! $parent && isset($data['parent']) && $data['parent'] && $data['parent'] !== $token) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not Doctrine ;). Spaces around ! aren't needed.

@guilhermeblanco
Copy link
Contributor Author

@Koc done!

@vicb
Copy link
Contributor

vicb commented Mar 16, 2012

@guilhermeblanco have you checked other storages for the same defect ?

@stof
Copy link
Member

stof commented Mar 16, 2012

@guilhermeblanco can you resend the PR to the 2.0 branch as it is a bugfix ?

@guilhermeblanco
Copy link
Contributor Author

@vicb No, I haven't.
This bug was blocking my team for over 3 days, we're delayed in our schedule. If you want, I can test other drivers beginning next sprint (next Thursday).

@stof submitting right now!

@vicb
Copy link
Contributor

vicb commented Mar 16, 2012

@guilhermeblanco could you please create a ticket so that it doesn't get lost (referencing the PR). Thanks.

@guilhermeblanco
Copy link
Contributor Author

@vicb Done. #3620

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

Successfully merging this pull request may close these issues.

4 participants