Silverstripe-framework: 3.6.2 → 3.6.3 Failing Tests

Created on 9 Jan 2018  Â·  2Comments  Â·  Source: silverstripe/silverstripe-framework

I noticed an issue when upgrading 3.6.2 to 3.6.3, where a number of project specific tests were suddenly failing. Looking into one of these, the problem was an _function returning null, when it's return value wasn't actually null. Changing this from _function to function fixed the problem. Digging further, I found the exact change that was causing the problem.

https://github.com/silverstripe/silverstripe-framework/commit/2aa1d8f2c495f47b3439d3c2d9f96a1e7f089113#diff-0d087a82b0840f218d5b11d54057998dL949 from https://github.com/silverstripe/silverstripe-framework/compare/3.6.2...3.6.3

If you revert this single change, everything passes as expected. It looks like this may be security related, however I wanted to raise this as an issue to spark some discussion on what this was attempting to achieve, and how this can be fixed.

affectv3 changpatch efforeasy impachigh typbug

Most helpful comment

I completely missed the fact that it was missing a return statement. Correct, adding a return does fix this. I'll submit a PR :)

All 2 comments

Does changing the linked method to return eval($code); resolve the issue? https://3v4l.org/689VZ

I completely missed the fact that it was missing a return statement. Correct, adding a return does fix this. I'll submit a PR :)

Was this page helpful?
0 / 5 - 0 ratings