File: use_cpanel_json_xs.diff

package info (click to toggle)
request-tracker4 4.4.6%2Bdfsg-1.1%2Bdeb12u3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-proposed-updates
  • size: 63,472 kB
  • sloc: javascript: 130,444; perl: 65,299; sh: 1,322; makefile: 471; python: 37; php: 30
file content (30 lines) | stat: -rw-r--r-- 951 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
From 1b09be766cb8ab9b3a1920e0b094bfe2a24e5260 Mon Sep 17 00:00:00 2001
From: Dominic Hargreaves <dom@earth.li>
Date: Sun, 9 Sep 2018 21:35:08 +0100
Subject: Force the use of Cpanel::JSON::XS

JSON::XS breaks RT due to the removed from_json/to_json methods and JSON.pm
prefers JSON::XS to our preferred implementation Cpanel::JSON::XS by
default.

Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=848041
Patch-Name: use_cpanel_json_xs.diff
---
 lib/RT/Interface/Web.pm | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/RT/Interface/Web.pm b/lib/RT/Interface/Web.pm
index a5a0f6e6..87102028 100644
--- a/lib/RT/Interface/Web.pm
+++ b/lib/RT/Interface/Web.pm
@@ -63,6 +63,10 @@ use warnings;
 
 package RT::Interface::Web;
 
+# Debian modification; see
+# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=848041
+BEGIN { $ENV{PERL_JSON_BACKEND}='Cpanel::JSON::XS'; }
+
 use RT::SavedSearches;
 use RT::CustomRoles;
 use URI qw();