WP-OAuth icon indicating copy to clipboard operation
WP-OAuth copied to clipboard

fixed some undefined indexes and other errors setting up Google

Open haroldkyle opened this issue 10 years ago • 3 comments

These problems could exist in other login files, but I was just looking at Google. Don't want to start the session if it's already started. Other undefined indexes fixed.

haroldkyle avatar Feb 19 '15 19:02 haroldkyle

Looks good, will finish reviewing and merge this weekend. I don't think there was a major concern with calling session_start() blindly or twice (other than an E_NOTICE error), but your fix appears to be a more standard pattern which couldn't hurt to implement. I'll also need to check if session_start() is actually being called twice and throwing an error somewhere, since I'm curious about that now.

Some refs:

http://stackoverflow.com/questions/2580322/is-there-any-harm-in-running-session-start-multiple-times-as-the-page-request

http://php.net/manual/en/function.session-status.php

perrybutler avatar Feb 20 '15 16:02 perrybutler

Yup, just trying to quiet my logs. Thanks!

Good point on checking whether this is called elsewhere in this plugin. I grepped my wp-content directory and didn't find many other possibilities, so it may well be this plugin trying to start the session multiple times.

haroldkyle avatar Feb 20 '15 16:02 haroldkyle

Would be great if you could merge this in and release it, lots of php notices are being thrown by this plugin when WP_DEBUG is on. This pull request fixes a big one that is on the main login form (wp-login.php).

jazbek avatar Apr 23 '15 22:04 jazbek