From cd8bcf3801226ab512cc6bd3fb65d9e4eaa7df54 Mon Sep 17 00:00:00 2001
From: Aleksander Machniak <alec@alec.pl>
Date: Tue, 24 Feb 2015 05:54:58 -0500
Subject: [PATCH] Fix "PHP Fatal error: Call to a member function getMessage() on a non-object"
---
plugins/help/help.php | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/plugins/help/help.php b/plugins/help/help.php
index 37fd908..d71cd0e 100644
--- a/plugins/help/help.php
+++ b/plugins/help/help.php
@@ -33,6 +33,11 @@
$this->register_action('about', array($this, 'action'));
$this->register_action('license', array($this, 'action'));
+ $this->add_hook('startup', array($this, 'startup'));
+ }
+
+ function startup($args)
+ {
$rcmail = rcmail::get_instance();
// add taskbar button
@@ -77,8 +82,14 @@
function tablink($attrib)
{
$rcmail = rcmail::get_instance();
+
$attrib['name'] = 'helplink' . $attrib['action'];
$attrib['href'] = $rcmail->url(array('_action' => $attrib['action'], '_extwin' => !empty($_REQUEST['_extwin']) ? 1 : null));
+
+ // title might be already translated here, so revert to it's initial value
+ // so button() will translate it correctly
+ $attrib['title'] = $attrib['label'];
+
return $rcmail->output->button($attrib);
}
--
Gitblit v1.9.1