[Bps-public-commit] rt-extension-timetracking branch master updated. 0.21-1-g393992f
BPS Git Server
git at git.bestpractical.com
Tue Mar 8 18:17:18 UTC 2022
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt-extension-timetracking".
The branch, master has been updated
via 393992f4ff5a3a706d631f406f6c1be17967bf37 (commit)
from 6547d6834e64cf5352508c7b26719e4f5ef5c4fe (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 393992f4ff5a3a706d631f406f6c1be17967bf37
Author: Jim Brandt <jbrandt at bestpractical.com>
Date: Tue Mar 8 13:15:11 2022 -0500
Confirm $Object is defined before checking type
The $Object passed via the MassageCustomFields callback
can be undef, so confirm it is defined before calling
isa. If $Object isn't defined, this currently causes
an error:
Can't call method "isa" on an undefined value
And the ticket page can't load.
diff --git a/html/Callbacks/RT-Extension-TimeTracking/Elements/ShowCustomFields/MassageCustomFields b/html/Callbacks/RT-Extension-TimeTracking/Elements/ShowCustomFields/MassageCustomFields
index 0ed4e6b..6afc000 100644
--- a/html/Callbacks/RT-Extension-TimeTracking/Elements/ShowCustomFields/MassageCustomFields
+++ b/html/Callbacks/RT-Extension-TimeTracking/Elements/ShowCustomFields/MassageCustomFields
@@ -1,5 +1,5 @@
<%INIT>
-return unless $Object->isa('RT::Transaction');
+return unless $Object && $Object->isa('RT::Transaction');
if ( !$Object->FirstCustomFieldValue('Worked Date') ) {
$CustomFields->Limit( FIELD => 'Name', VALUE => 'Worked Date', OPERATOR => '!=', CASESENSITIVE => 0 );
}
-----------------------------------------------------------------------
Summary of changes:
.../Elements/ShowCustomFields/MassageCustomFields | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
hooks/post-receive
--
rt-extension-timetracking
More information about the Bps-public-commit
mailing list