Skip to content

Commit 81a6c01

Browse files
committed
fix(target_actor): tell the ID of missing actor
Signed-off-by: Thierry Bugier <tbugier@teclib.com>
1 parent 6e05962 commit 81a6c01

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

inc/target_actor.class.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public static function import(PluginFormcreatorLinker $linker, $input = [], $con
136136
$user = new User;
137137
$users_id = plugin_formcreator_getFromDBByField($user, 'name', $input['actor_value']);
138138
if ($users_id === false) {
139-
throw new ImportFailureException('failed to find a user');
139+
throw new ImportFailureException(sprintf(__('failed to find a user: ID %1$d'), $users_id));
140140
}
141141
$input['actor_value'] = $users_id;
142142
break;
@@ -145,7 +145,7 @@ public static function import(PluginFormcreatorLinker $linker, $input = [], $con
145145
$group = new Group;
146146
$groups_id = plugin_formcreator_getFromDBByField($group, 'completename', $input['actor_value']);
147147
if ($groups_id === false) {
148-
throw new ImportFailureException('failed to find a group');
148+
throw new ImportFailureException(sprintf(__('failed to find a group: ID %1$d'), $groups_id));
149149
}
150150
$input['actor_value'] = $groups_id;
151151
break;
@@ -154,7 +154,7 @@ public static function import(PluginFormcreatorLinker $linker, $input = [], $con
154154
$supplier = new Supplier;
155155
$suppliers_id = plugin_formcreator_getFromDBByField($supplier, 'name', $input['actor_value']);
156156
if ($suppliers_id === false) {
157-
throw new ImportFailureException('failed to find a supplier');
157+
throw new ImportFailureException(sprintf(__('failed to find a supplier: ID %1$d'), $suppliers_id));
158158
}
159159
$input['actor_value'] = $suppliers_id;
160160
break;

0 commit comments

Comments
 (0)