dopiaza / DPZFlickr

PHP API Kit for Flickr with support for OAuth
Other
30 stars 21 forks source link

Session check in constructor #5

Open claze opened 9 years ago

claze commented 9 years ago

Inside __construct there should be a check to see if there is already a started session when using this code in a more complex application (e.g. Zend Framework) or else PHP will throw a notice.

session_start();

should be:

if (session_id() == '') {
    session_start();
}
mikesalmonuk commented 9 years ago

Any chance this could be included in the next update? My application is throwing a few PHP notice errors about "A session had already been started". It would be good to check the session_id() first, as @claze has already mentioned.