easydigitaldownloads/Easy-Digital-Downloads — pull request #2767 by dannyvankooten (2014-11-11 19:10:07+00:00)
Title: Rewrite use_php_session method.

I had a problem with PHP sessions on the latest version of HHVM and came across this function. I rewrote it to be a lot simpler and removed unused method calls.

- If the constant is defined, we can just use that. (simplified logic)
- The `get_option` return value was cast to a boolean which made the auto-detection code run on every page load if it would return false.
- The `edd_use_php_sessions` key in the `$session` array was never used. Also, `set` was called and immediately after that `get` was called which makes no sense since it's just stored in the object property.