Mark_invisu Posted July 30 Posted July 30 Hello, I'm getting an error: Dangit… Fatal Error: Uncaught Error: Class "SessionHandlerDB" not found in site/templates/content.php:2320 The error is pointing to a function: function onlineUserIDs($mins, $limit = 500) { $table = SessionHandlerDB::dbTableName; $seconds = $mins * 60; $sql = "SELECT user_id " . "FROM `$table` " . "WHERE ts > DATE_SUB(NOW(), INTERVAL $seconds SECOND) " . "AND user_id!=40 " . // exclude guest "ORDER BY ts DESC LIMIT $limit"; $query = wire('database')->prepare($sql); $query->execute(); $results = $query->fetchAll(\PDO::FETCH_COLUMN); return $results; } This isn't my code so i'm struggling a bit to wrap my head around it do any of you have an ideas? Thanks, Mark.
elabx Posted July 30 Posted July 30 Does content.php have namespaces? I also randomly sometimes get these errors, I think it has something to do with the ProcessWire FileCompiler, using namespaces everywhere reduces the chance of this happening. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now