PHPSessionHandler: Workaround PHP5 bug
authorBrad Jorsch <bjorsch@wikimedia.org>
Mon, 24 Oct 2016 14:15:42 +0000 (10:15 -0400)
committerBrad Jorsch <bjorsch@wikimedia.org>
Mon, 24 Oct 2016 14:25:43 +0000 (10:25 -0400)
commitf9d07f7ff23861c7abca27b72f0be29c292aa357
tree73c0ecb3382515b3717d116c70c1272b81d7d301
parentfb4c96c9182506839cebc44b97e04ae628008267
PHPSessionHandler: Workaround PHP5 bug

PHP5 has a bug in handling boolean return values for
SessionHandlerInterface methods, it expects 0 or -1 instead of true or
false. See <https://wiki.php.net/rfc/session.user.return-value>.

PHP7 and HHVM are not affected.

No tests are added here because the only case where it actually makes a
difference is a can-never-happen branch.

Also, since I'm touching it already, add a @codeCoverageIgnore for the
code no longer tested thanks to I6e153ec8.

Change-Id: Id87478964b3985ed8bf4dd00bbc09f65ddfcc130
includes/session/PHPSessionHandler.php