From 7335525ecd1094ff70a71886306df0166f676e35 Mon Sep 17 00:00:00 2001
From: Jared Hancock <jared@osticket.com>
Date: Thu, 22 May 2014 12:02:35 -0500
Subject: [PATCH] oops: Fix $this usage in static function

---
 include/class.ticket.php | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/include/class.ticket.php b/include/class.ticket.php
index d46734e7d..c3f492469 100644
--- a/include/class.ticket.php
+++ b/include/class.ticket.php
@@ -2181,7 +2181,8 @@ class Ticket {
      *
      *  $autorespond and $alertstaff overrides config settings...
      */
-    function create($vars, &$errors, $origin, $autorespond=true, $alertstaff=true) {
+    static function create($vars, &$errors, $origin, $autorespond=true,
+            $alertstaff=true) {
         global $ost, $cfg, $thisclient, $_FILES;
 
         // Don't enforce form validation for email
@@ -2499,7 +2500,7 @@ class Ticket {
             $collabs = array();
             foreach ($org->allMembers() as $u) {
                 if ($members || ($pris && $u->isPrimaryContact())) {
-                    if ($c = $this->addCollaborator($u, $settings, $errors)) {
+                    if ($c = $ticket->addCollaborator($u, $settings, $errors)) {
                         $collabs[] = (string) $c;
                     }
                 }
@@ -2507,7 +2508,7 @@ class Ticket {
             //TODO: Can collaborators add others?
             if ($collabs) {
                 //TODO: Change EndUser to name of  user.
-                $this->logNote(sprintf('Collaborators for %s organization added',
+                $ticket->logNote(sprintf('Collaborators for %s organization added',
                         $org->getName()),
                     implode("<br>", $collabs), $org->getName(), false);
             }
-- 
GitLab