z2systems / neon-php

The PHP library for the NeonCRM API.
18 stars 9 forks source link

Check if session has started before starting one #3

Closed vinnyusestrict closed 4 years ago

vinnyusestrict commented 4 years ago

It's good practice to check if a session has started before starting a new one. I'm integrating this into custom WordPress code and the unit test suite already creates a session. The result is

session_start(): Cannot send session cookie - headers already sent by (output started at...

I'll create a pull request with the fix.

vinnyusestrict commented 4 years ago

Actually, it's a different issue altogether. PHPUnit is echoing before the test runs, which is what triggers the headers already sent.

Closing the issue.