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 Lousy Butterfly, 11 Years ago, written in Python for S60.
Embed
  1. """Apache Log filtering application"""
  2.  
  3. import datetime
  4. import re
  5. import decimal
  6. import json
  7. import logging
  8.  
  9. ATTRIBUTES = set((
  10.         'ip',
  11.         'utc_timestamp',
  12.         'verb',
  13.         'path',
  14.         'protocol',
  15.         'status',
  16.         'response_length',
  17.         'referer',
  18.         'agent',
  19.         ))
  20.  
  21. class MyJsonEncoder(json.JSONEncoder):
  22.     """JSON encoder supporting Python datetime and decimal types"""
  23.  
  24.     def default(self, obj): # pylint: disable=method-hidden
  25.         if isinstance(obj, datetime.datetime):
  26.             return obj.strftime('%Y/%m/%d %H:%M:%S')
  27.         elif isinstance(obj, datetime.date):
  28.             return obj.strftime('%Y/%m/%d')
  29.         elif isinstance(obj, datetime.time):
  30.             return obj.strftime('%H:%M:%S')
  31.         elif isinstance(obj, datetime.timedelta):
  32.             return (obj.days * 24 * 60 * 60) + obj.seconds
  33.         elif isinstance(obj, decimal.Decimal):
  34.             return float(obj)
  35.         else:
  36.             return json.JSONEncoder.default(self, obj)
  37.  
  38.