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

When methos stop working - Stikked
From Sajid Khan, 9 Years ago, written in JavaScript.
Embed
  1. myfunction: function() {
  2.         //TICKET INFORMATION
  3.         var ticket_id=this.ticket().id(),
  4.             ticket_subject=this.ticket().subject(),
  5.             ticket_description=this.ticket().description(),
  6.             ticket_status=this.ticket().status(),
  7.             ticket_comment=this.comment().text();
  8.            
  9.         //TICKET REQUESTER INFORMATION
  10.         var requester_id;
  11.         if(this.ticket().requester()!=null){
  12.             requester_id=this.ticket().requester().id();
  13.         }
  14.         else
  15.         {
  16.             requester_id="1905816979";
  17.         }
  18.         var requester_ID,
  19.             requester_name,
  20.             requester_email,
  21.             requester_phone;
  22.            
  23.         //SUBMITER INFORMATION
  24.         var submitter_id=this.currentUser().id();
  25.         var submitter_ID,
  26.             submitter_name,
  27.             submitter_email,
  28.             submitter_phone;
  29.         var group_id;
  30.         var member_ID,smember_ID;
  31.         var full_name = "Alexender PINTO";
  32.         var first_name,last_name;
  33.         var sfull_name = "Alexender PINTO";
  34.         var sfirst_name,slast_name;
  35.         if(ticket_status=="solved")
  36.         {
  37.             console.log('Ticket status :-'+ticket_status);
  38.             this.ajax('getTicketGroupRequest',ticket_id);
  39.         }
  40.         else
  41.         {
  42.             if(this.ticket().comments().length==1){
  43.                
  44.                     var call1_1 =this.ajax('createGroupRequest',ticket_id,ticket_subject,ticket_description);
  45.                     var call2_1 =this.ajax('rUserInfo',requester_id); //'/api/v2/users/' + requester_id+ '.json'
  46.                     var call3_1=this.ajax('sUserInfo',submitter_id);   //'/api/v2/users/' + requester_id+ '.json'
  47.                    
  48.  
  49.                 this.when(call1_1, call2_1,call3_1).done(function(call1Data, data,call3Data){
  50.                         console.log(" [1] Create Group Request");
  51.                         group_id=call1Data[0];
  52.                         console.log('GROUP ID :- '+group_id);
  53.                         console.log("[2] rUserInfo ");
  54.                         requester_ID=data[0].user.id;
  55.                         requester_name=data[0].user.name;
  56.                         requester_email=data[0].user.email;
  57.                         requester_phone=data[0].user.phone;
  58.                         full_name=data[0].user.name;
  59.                         var name = full_name.split(" ");
  60.                        
  61.                         if(name.length>=2){
  62.                             first_name=name[0];
  63.                             last_name=name[1];
  64.                         }
  65.                         else
  66.                         {
  67.                             first_name=name[0];
  68.                             last_name="Last_Name";
  69.                         }
  70.                         console.log(group_id+'>>'+requester_ID+'>>'+requester_email+'>>'+requester_name+'>>'+requester_phone+'>>'+first_name+'>>'+last_name);
  71.                         console.log("[3] sUserInfo ");
  72.                         submitter_ID=call3Data[0].user.id;
  73.                         submitter_name=call3Data[0].user.name;
  74.                         submitter_email=call3Data[0].user.email;
  75.                         submitter_phone=call3Data[0].user.phone;
  76.                         sfull_name=call3Data[0].user.name;
  77.                         var sname = sfull_name.split(" ");
  78.                        
  79.                         if(sname.length>=2){
  80.                             sfirst_name=name[0];
  81.                             slast_name=name[1];
  82.                         }
  83.                         else
  84.                         {
  85.                             sfirst_name=name[0];
  86.                             slast_name="Last_Name";
  87.                         }
  88.                         console.log(group_id+'>>'+submitter_ID+'>>'+submitter_email+'>>'+submitter_name+'>>'+submitter_phone+'>>'+sfirst_name+'>>'+slast_name);
  89.                        
  90.                     }).fail(function(){
  91.                     this.switchTo('error');
  92.                 });
  93.                 console.log("[4] Add Members Submitter  ");
  94.                 if(submitter_phone!=null)
  95.                 {
  96.                                 // External Request
  97.                         this.promise(function(done, fail) {
  98.                             this.ajax('addsMemberRequest',group_id,submitter_phone,sfirst_name,slast_name).then(
  99.                                 function(data) {
  100.                                     member_ID=data;
  101.                                     console.log('SUBMITER MEMEBER ID :- '+member_ID);
  102.                                     done();     // ok to save the ticket
  103.                                 },
  104.                                 function(data) {
  105.                                     console.log('Add  Submitter Members  failed');
  106.                                     console.log(data);
  107.                                     done();     // failed, but save the ticket anyway
  108.                                 }
  109.                             );
  110.                     });
  111.                 }
  112.                 console.log("[5] Add Members Requester ");
  113.                 if(requester_phone!=null)
  114.                 {
  115.                         // External Request
  116.                         this.promise(function(done, fail) {
  117.                             this.ajax('addrMemberRequest',group_id,requester_phone,first_name,last_name).then(
  118.                                 function(data) {
  119.                                     member_ID=data;
  120.                                     console.log('REQUESTER MEMEBER ID :- '+member_ID);
  121.                                     done();     // ok to save the ticket
  122.                                 },
  123.                                 function(data) {
  124.                                     console.log('Add  Requester Members  failed');
  125.                                     console.log(data);
  126.                                     done();     // failed, but save the ticket anyway
  127.                                 }
  128.                             );
  129.                     });
  130.                 }
  131.             }
  132.             else
  133.             {
  134.                     var call1 =this.ajax('getTicketGroupRequest',ticket_id);
  135.                     var call3=this.ajax('sUserInfo',submitter_id);
  136.                    
  137.  
  138.                 this.when(call1,call3).done(function(call1Data,call3Data){
  139.                         console.log("[1] getTicketGroupRequest ");
  140.                         group_id=call1Data[0];
  141.                         console.log('GROUP ID :- '+group_id);
  142.                        
  143.                         console.log("[2] sUserInfo ");
  144.                         submitter_ID=call3Data[0].user.id;
  145.                         submitter_name=call3Data[0].user.name;
  146.                         submitter_email=call3Data[0].user.email;
  147.                         submitter_phone=call3Data[0].user.phone;
  148.                         sfull_name=submitter_name;
  149.                         var sname = sfull_name.split(" ");
  150.                        
  151.                         if(sname.length>=2){
  152.                             sfirst_name=name[0];
  153.                             slast_name=name[1];
  154.                         }
  155.                         else
  156.                         {
  157.                             sfirst_name=name[0];
  158.                             slast_name="Last_Name";
  159.                         }
  160.                         console.log(group_id+'>>'+submitter_ID+'>>'+submitter_email+'>>'+submitter_name+'>>'+submitter_phone+'>>'+sfirst_name+'>>'+slast_name);
  161.                        
  162.                     }).fail(function(){
  163.                     this.switchTo('error');
  164.                 });
  165.                 console.log("[3] Add Members Submitter ");
  166.                 if(submitter_phone!=null)
  167.                 {
  168.                     // External Request
  169.                         this.promise(function(done, fail) {
  170.                             this.ajax('addsMemberRequest',group_id,submitter_phone,sfirst_name,slast_name).then(
  171.                                 function(data) {
  172.                                     member_ID=data;
  173.                                     console.log('SUBMITER MEMEBER ID :- '+member_ID);
  174.                                     done();     // ok to save the ticket
  175.                                 },
  176.                                 function(data) {
  177.                                     console.log('Add  Submitter Members  failed');
  178.                                     console.log(data);
  179.                                     done();     // failed, but save the ticket anyway
  180.                                 }
  181.                             );
  182.                     });
  183.                 }
  184.             }
  185.             console.log("[4,5] Send Message ");
  186.             // External Request
  187.                 this.promise(function(done, fail) {
  188.                     this.ajax('sendMessageRequest',group_id,ticket_comment).then(
  189.                         function(data) {
  190.                             console.log('Message :- '+data[0]);
  191.                             done();     // ok to save the ticket
  192.                         },
  193.                         function(data) {
  194.                             console.log('Send Message Request failed');
  195.                             console.log('Message :- '+data[0]);
  196.                             done();     // failed, but save the ticket anyway
  197.                         }
  198.                     );
  199.             });
  200.         }
  201.        
  202.     },