From adb0c3407c4ce338576a588b622f55b0b2938491 Mon Sep 17 00:00:00 2001 From: mwjames Date: Sat, 15 Sep 2018 20:14:11 +0000 Subject: [PATCH] Try/catch PredefinedPropertyLabelMismatchException --- .../ChangeNotificationPresentationModel.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ChangeNotification/ChangeNotificationPresentationModel.php b/src/ChangeNotification/ChangeNotificationPresentationModel.php index 5568605..ed1297b 100644 --- a/src/ChangeNotification/ChangeNotificationPresentationModel.php +++ b/src/ChangeNotification/ChangeNotificationPresentationModel.php @@ -114,7 +114,11 @@ public function getBodyMessage() { $prefix = $this->language->getNsText( NS_CATEGORY ) . ':'; } - $labels[] = $prefix . DIProperty::newFromUserLabel( $dataItem->getDBKey() )->getLabel(); + try { + $labels[] = $prefix . DIProperty::newFromUserLabel( $dataItem->getDBKey() )->getLabel(); + } catch ( \SMW\Exception\PredefinedPropertyLabelMismatchException $e ) { + continue; + } } $msg = wfMessage( "notification-body-{$this->type}" );