Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13060
patch.diff
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Authored By
•
bzimport
Nov 22 2014, 2:58 AM
2014-11-22 02:58:10 (UTC+0)
Size
2 KB
Referenced Files
None
Subscribers
None
patch.diff
View Options
From ad24456a96a6edfbce05098ce71b0a07084a80b0 Mon Sep 17 00:00:00 2001
From: Kunal Mehta <legoktm@gmail.com>
Date: Wed, 5 Feb 2014 09:10:53 -0800
Subject: [PATCH] Don't throw exceptions in the Echo formatter
Bug: 60906
Change-Id: I16b654666013a2120764ed3fdb5194ee3d286c9a
---
includes/Notifications/Formatter.php | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/includes/Notifications/Formatter.php b/includes/Notifications/Formatter.php
index 255c45b..f421aa6 100644
--- a/includes/Notifications/Formatter.php
+++ b/includes/Notifications/Formatter.php
@@ -5,6 +5,7 @@ namespace Flow;
use Flow\Container;
use Flow\UrlGenerator;
use EchoBasicFormatter;
+use Flow\Exception\InvalidInputException;
// could be renamed later if we have more formatters
class NotificationFormatter extends EchoBasicFormatter {
@@ -86,7 +87,12 @@ class NotificationFormatter extends EchoBasicFormatter {
$post = $event->getExtraParam( 'post-id' );
$flow = $event->getExtraParam( 'topic-workflow' );
if ( $post && $flow && $title ) {
- list( $target, $query ) = $urlGenerator->generateUrlData( $flow );
+ try {
+ list( $target, $query ) = $urlGenerator->generateUrlData( $flow );
+ } catch ( InvalidInputException $e ) {
+ // @FIXME can't throw an exception here bug 60906
+ }
+
// Take user to the post if there is only one target post,
// otherwise, take user to the topic view
if ( $this->bundleData['raw-data-count'] <= 1 ) {
@@ -102,8 +108,11 @@ class NotificationFormatter extends EchoBasicFormatter {
case 'flow-topic':
$topic = $event->getExtraParam( 'topic-workflow' );
- list( $target, $query ) =
- $urlGenerator->generateUrlData( $topic );
+ try {
+ list( $target, $query ) = $urlGenerator->generateUrlData( $topic );
+ } catch ( InvalidInputException $e ) {
+ // @FIXME can't throw an exception here bug 60906
+ }
break;
default:
return parent::getLinkParams( $event, $user, $destination );
--
1.8.5.3
File Metadata
Details
Attached
Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
12501
Default Alt Text
patch.diff (2 KB)
Attached To
Mode
T62906: Flow breaking [[Special:Notifications]]
Attached
Detach File
Event Timeline
Log In to Comment