[Bps-public-commit] RT-Extension-rt_cpan_org branch, master, updated. ea66e778de41f851f4261b970108c144fbc91069

Thomas Sibley trs at bestpractical.com
Tue May 14 18:40:46 EDT 2013


The branch, master has been updated
       via  ea66e778de41f851f4261b970108c144fbc91069 (commit)
      from  cfc29105b1bf6743b8ec18e9213fdb43dace1b1a (commit)

Summary of changes:
 patches/4.0.14-session-store-errors.patch | 33 +++++++++++++++++++++++++++++++
 1 file changed, 33 insertions(+)
 create mode 100644 patches/4.0.14-session-store-errors.patch

- Log -----------------------------------------------------------------
commit ea66e778de41f851f4261b970108c144fbc91069
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Tue May 14 15:40:00 2013 -0700

    Patch to fix RT's session error handler
    
    Runtime errors about loc() popped up in the rt.cpan.org error logs, and
    the underlying cause isn't clear since our error handler blew up too
    early.

diff --git a/patches/4.0.14-session-store-errors.patch b/patches/4.0.14-session-store-errors.patch
new file mode 100644
index 0000000..a45409c
--- /dev/null
+++ b/patches/4.0.14-session-store-errors.patch
@@ -0,0 +1,33 @@
+From 53fbab0f164591c564d3e786386b705443233c19 Mon Sep 17 00:00:00 2001
+From: Thomas Sibley <trs at bestpractical.com>
+Date: Tue, 14 May 2013 15:37:13 -0700
+Subject: [PATCH] Correct a runtime error in our tied session error handler
+
+loc() isn't a function available from within the internals of the
+Session class, and especially not when we failed to store the current
+user's session.  Localization of this error doesn't make sense anyway
+since it now goes to the logs and not the end user.
+---
+ lib/RT/Interface/Web/Session.pm | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/lib/RT/Interface/Web/Session.pm b/lib/RT/Interface/Web/Session.pm
+index 4edd9bd..7910d41 100644
+--- a/lib/RT/Interface/Web/Session.pm
++++ b/lib/RT/Interface/Web/Session.pm
+@@ -276,10 +276,8 @@ sub TIEHASH {
+     eval { tie %session, $class, $id, $attrs };
+     eval { tie %session, $class, undef, $attrs } if $@;
+     if ( $@ ) {
+-        die loc("RT couldn't store your session.") . "\n"
+-          . loc("This may mean that that the directory '[_1]' isn't writable or a database table is missing or corrupt.",
+-            $RT::MasonSessionDir)
+-          . "\n\n"
++        die "RT couldn't store your session.  "
++          . "This may mean that that the directory '$RT::MasonSessionDir' isn't writable or a database table is missing or corrupt.\n\n"
+           . $@;
+     }
+ 
+-- 
+1.8.2.2
+

-----------------------------------------------------------------------



More information about the Bps-public-commit mailing list