Skip to content

Conversation

@bckp
Copy link
Contributor

@bckp bckp commented Sep 11, 2018

If you call ResultSet::dump with null as column value, it will raise TypeError, so $col should be retyped to string, as htmlspecialchars expects string.

  • bug fix
  • BC break? no

@bckp
Copy link
Contributor Author

bckp commented Sep 11, 2018

Or maybe add new Helper, that will translate column value to the proper type (boolean, string, number, null)

If you call dump on ResultSet and non-string value (like null) exists, dump will raise TypeError exception on PHP7.1 and newer (maybe even on older version).
This add new static dumpVar method, that will try to escape value and return always string.
@bckp
Copy link
Contributor Author

bckp commented Sep 14, 2018

@dg ping, if you have any ideas, what should be changed, just give me call :)

@dg
Copy link
Member

dg commented Sep 14, 2018

I'll make it little bit simpler, ok? ;-)

@dg dg merged commit 1d1d2a6 into nette:master Sep 14, 2018
dg pushed a commit that referenced this pull request Sep 14, 2018
If you call dump on ResultSet and non-string value (like null) exists, dump will raise TypeError exception on PHP7.1 and newer (maybe even on older version).
This add new static dumpVar method, that will try to escape value and return always string.
dg pushed a commit that referenced this pull request Sep 14, 2018
If you call dump on ResultSet and non-string value (like null) exists, dump will raise TypeError exception on PHP7.1 and newer (maybe even on older version).
This add new static dumpVar method, that will try to escape value and return always string.
@bckp
Copy link
Contributor Author

bckp commented Sep 14, 2018

Sure :-)

@bckp bckp deleted the patch-1 branch September 14, 2018 11:51
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