cphalcon icon indicating copy to clipboard operation
cphalcon copied to clipboard

[BUG] Complex Resultset double unserializing

Open ALameLlama opened this issue 3 years ago • 1 comments

Hello!

  • Type: bug fix
  • Link to issue: https://github.com/phalcon/cphalcon/issues/16035

In raising this pull request, I confirm the following:

  • [x] I have read and understood the Contributing Guidelines
  • [x] I have checked that another pull request for this purpose does not exist
  • [ ] I wrote some tests for this PR
  • [x] I have updated the relevant CHANGELOG
  • [ ] I have created a PR for the documentation about this change

Small description of change: This fixes the double unserializing in the complex resultset, the function __unserialize(array data) takes an array and tries to unserialize it again, this can be removed since it's already unserialized by this point

I've also cleaned up the function serialize to have a data variable

Thanks

ALameLlama avatar Aug 03 '22 01:08 ALameLlama

This will fail in PHP8.1. As there are no tests against Complex class so CI passes...

Jeckerson avatar Sep 21 '22 09:09 Jeckerson

@Jeckerson I think the new changes made to this PR should work with both 7.4-8.0 and 8.1

ALameLlama avatar Oct 13 '22 22:10 ALameLlama

Thank you!

Jeckerson avatar Oct 14 '22 14:10 Jeckerson