Skip to content

Conversation

@vojtech-dobes
Copy link
Contributor

  • bug fix
  • no BC break

When stack trace contains 'object' field (which is awesomely supported for many years :) ), Logger doesn't get rid of it before serialization when establishing exception file name. This PR removes the 'object' field in same way as 'args' is being dropped already.

@dg
Copy link
Member

dg commented Apr 21, 2021

What you mean by which is awesomely supported for many years? Supported by PHP?

@vojtech-dobes
Copy link
Contributor Author

Supported by PHP?

Supported by Tracy.

@dg
Copy link
Member

dg commented Apr 21, 2021

Look, I don't understand you at all :-)

I've never seen an 'object' field in exception callstack. Maybe you have a PHP extension that puts it there, PHP doesn't do that https://www.php.net/manual/en/exception.gettrace.php

@vojtech-dobes
Copy link
Contributor Author

@dg Yes, there is no simple way to get it there, only debug_backtrace generates that. I was only referring to the fact that Tracy is aware of possible existence of that field :). And this PR is only about the discovery that when it's truly present (in some non-standard magical way), other part can break (serialization). I would love if this was accepted. I can imagine it could be accepted because it has I believe no impact on code that doesn't get somehow (magically) object field populated.

@dg dg closed this Apr 21, 2021
@dg
Copy link
Member

dg commented Apr 21, 2021

I'm sorry, but I feel like you're wasting my time. There is no field.

@vojtech-dobes
Copy link
Contributor Author

vojtech-dobes commented Apr 21, 2021

@dg that was definitely not my intention, so sorry for that. But can you please tell me, is there some reason why same argument wouldn't apply for existence of this:

if (isset($row['object'])) echo "<a data-tracy-ref='^p + .object' class='tracy-toggle tracy-collapsed'>";

I was basing my reasoning entirely on existence of this "support".

@dg
Copy link
Member

dg commented Apr 22, 2021

Ah, I get it. It is probably some historical relict…

@vojtech-dobes vojtech-dobes deleted the dont-serialize-object branch April 22, 2021 11:59
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.

2 participants