filp / whoops

PHP errors for cool kids

Home Page:http://filp.github.io/whoops/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Masking only works on strings.

prdatur opened this issue · comments

Hello,

Masking within PrettyPageHandler only masks the contents if it is a string

if (isset($superGlobal[$key]) && is_string($superGlobal[$key])) {

We have model's stored into the session, which I want to hide.
I could make an own CustomPrettyPageHandler
But the method in PrettyPageHandler is private so I would need to copy & paste the whole contents, which makes no sense for me.

Possible solutions:

  • Allow hiding non-string contents (Just place *** with maybe gettype($superGlobal[$key]))
  • Make the mask-method protected, so we can do our own stuff on that.

What you think?

Perhaps $prettyPageHandler->hideSuperglobalKey already satisfies your use case?

Please read my post completely.
I tried to hide it with that method but as I wrote hiding only works if the value is a string, my value is an object

I have read your post completely, you had not mentioned you had used hideSuperglobalKey already and I thought you have used some other function.

From where I’m at, the hideSuperglobalKey should absolutely hide non-string values, it’s in the name. It does not hide them, does it? So I would be very open to a PR that removes the is_string condition in PrettyPageHandler->masked and shows some stars for non-string values. I think that’s your solution number one.

Sorry it was a bit late yesterday, didn't want to be rude. This comes from stackoverflow where people very often don't read :)
Will open a PR.