A PHP Error was encountered

Severity: 8192

Message: Function create_function() is deprecated

Filename: geshi/geshi.php

Line Number: 4698

Backtrace:

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4698
Function: _error_handler

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4621
Function: _optimize_regexp_list_tokens_to_string

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 1655
Function: optimize_regexp_list

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2029
Function: optimize_keyword_group

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2168
Function: build_parse_cache

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/Process.php
Line: 45
Function: parse_code

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/models/Pastes.php
Line: 517
Function: syntax

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/controllers/Main.php
Line: 693
Function: getPaste

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/index.php
Line: 315
Function: require_once

Untitled - Stikked
From Sweltering Wigeon, 6 Years ago, written in Python.
Embed
  1.     def addUserToRoomm(self, room, user):
  2.         query = {"rid": room['_id'], "u._id": user['_id']}
  3.         subscription = self.db.rocketchat_subscription.find_one(query)
  4.         if subscription:
  5.             roles = []
  6.             if "roles" in subscription:
  7.                 if "owner" in subscription['roles']:
  8.                     raise ValueError("Already owner")
  9.                 roles = subscription['roles']
  10.             roles.append("owner")
  11.             self.db.rocketchat_subscription.update_one(query, {"$set": { "roles": roles }})
  12.         else:
  13.             subscription = {
  14.                 "open": True,
  15.                 "alert": True,
  16.                 "unread": 0,
  17.                 "userMentions": 0,
  18.                 "groupMentions": 0,
  19.                 "ts": room['ts'],
  20.                 "rid": room['_id'],
  21.                 "name": room['name'],
  22.                 "fname": room['fname'],
  23.                 "customFields": room['customFields'],
  24.                 "t": room['t'],
  25.                 "u": {
  26.                         "_id": user['_id'],
  27.                         "username": user['username'],
  28.                         "name": user['name'],
  29.                 },
  30.                 "roles": ["owner"]
  31.  
  32.             }
  33.             self.db.rocketchat_subscription.insert_one(subscription)
  34.             self.db.rocketchat_room.update({"_id": room['_id']}, {"$inc": {"usersCount": 1}})
  35.