gothfox/Tiny-Tiny-RSS — pull request #120 by dandersson (2013-04-02 09:48:34+00:00)
Title: Check that $session_connection is defined before using it

Recent updates to `include/sessions.php` () makes Apache spam

> [Tue Apr 02 11:30:03 2013] [error] [client 127.0.0.1] PHP Notice: Undefined variable: session_connection in /[...]/Tiny-Tiny-RSS/include/sessions.php on line 183

to my error log (tried restarting browsers: problem persisted). This pull request checks that the variable is defined before referencing it.

At first I guessed that an unset `$session_connection` variable should be equivalent to an invalid session (`!validate_session($session_connection)` in the relevant if-clause), but using that condition my browser gets caught in a reload loop when accessing the main page.

With this change I can't directly see any stranged behavior (except less cluttered logs). I can perform more tests if it is something in my local setup that breaks the assumption that `$session_connection` should be set.