From 2e82683aa55eb34e2f499dc9803ad095a28dd676 Mon Sep 17 00:00:00 2001 From: Jared Hancock <jared@osticket.com> Date: Wed, 18 Jun 2014 12:35:14 -0500 Subject: [PATCH] php: Fix global variable clobber issue Some versions of PHP (5.3.6 on Windows at least) may corrupt `$ost` if it is closed off as a global variable. Fixes #917, #969 --- include/class.ticket.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/class.ticket.php b/include/class.ticket.php index 7b41282ae..6518d12ea 100644 --- a/include/class.ticket.php +++ b/include/class.ticket.php @@ -2218,7 +2218,8 @@ class Ticket { }; }; - $reject_ticket = function($message) use (&$errors, $ost) { + $reject_ticket = function($message) use (&$errors) { + global $ost; $errors = array( 'errno' => 403, 'err' => 'This help desk is for use by authorized users only'); -- GitLab