#98 At least ADODB_Session class is not E_STRICT compliant

open
Sessions (4)
5
2009-05-14
2009-05-14
No

ADODB_Session class under PHP 5 throws warnings when PHP E_STRICT error reporting mode is enabled. Warnings say smth like:
Strict standards: Non-static method ADODB_Session::sess_open() cannot be called statically in /mnt/hgfs/htdocs/oxideshop/eshop/source/core/adodblite/session/adodb-session.php on line 207

Reproductable by:
//first connect to mysql
//then:
error_reporting(E_ALL | E_STRICT);
require_once("adodb-session.php");
session_start();

Way to fix:
Declare all ADODB_Session class methods as static. So:
function sess_open($sess_path, $sess_name, $persist = null)
becomes
static function sess_open($sess_path, $sess_name, $persist = null)

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks