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 Fredy, 9 Years ago, written in PHP.
Embed
  1.         /**
  2.          * Setter of the Points
  3.          *
  4.          * @param ArrayCollection|array|Point|serialized array $points
  5.          * @return self (fluent interface)
  6.          */
  7.         public function setPoints($points) {
  8.  
  9.                 if ($points) {
  10.  
  11.                         // is the input instance of an ArrayCollection ?
  12.                         if ($points instanceof ArrayCollection) {
  13.  
  14.                                 $workPoints = $points;
  15.  
  16.                         // is the input an Array ?
  17.                         } elseif (is_array($points)) {
  18.  
  19.                                 $workPoints = $points;
  20.  
  21.  
  22.                         // is the input a Point, Points, PointSet or children ?
  23.                         } elseif (is_object($points)) {
  24.  
  25.                                 $workPoints = $points->getAsArray();
  26.  
  27.                         // JSON array from MapControl
  28.                         } elseif (substr($points, 0, 2) === '[[') {
  29.  
  30.                                 $workPoints = json_decode($points);
  31.  
  32.                         // may be serialized array
  33.                         } elseif (substr($points, 0, 2) === 'a:') {
  34.  
  35.                                 $workArray = unserialize($points);
  36.                                 if (is_array($workArray)) {
  37.  
  38.                                         $workPoints = $workArray;
  39.  
  40.                                 }
  41.  
  42.                         // may be encoded polyline
  43.                         } else {
  44.  
  45.                                 $workArray = self::getPolylineAsArray($points);
  46.                                 if (is_array($workArray)) {
  47.  
  48.                                         $workPoints = $workArray;
  49.  
  50.                                         // unknown format
  51.                                 } else {
  52.                                                 throw new GeoException('Unrecognized data format.');
  53.                                 }
  54.                         }
  55.  
  56.                         // fill the pointSet
  57.                         foreach ($workPoints as $point) {
  58.                                 $this->add($point);
  59.                         }
  60.  
  61.                         if ($this instanceof Path) {
  62.  
  63.                                 if ($this->getCount() < 2) {
  64.                                         throw new GeoException(__('The Path must have at least 2 vertices.'));
  65.                                 }
  66.                         } elseif ($this instanceof Border) {
  67.  
  68.                                 if ($this->getCount() < 4) {
  69.                                         throw new GeoException(__('The Border must have at least 3 vertices'));
  70.                                 }
  71.                                 if ($this->get(0) != $this->get($this->getCount() - 1)) {
  72.                                         throw new GeoException(__('The Border is not closed.'));
  73.                                 }
  74.  
  75.                         }
  76.                 }
  77.                 return $this;
  78.         }
  79.