Skip to content

Commit

Permalink
"ErrorException" thrown in /www/............./redaxo/src/addons/multi…
Browse files Browse the repository at this point in the history
…newsletter/lib/d2u_addon_backend_helper.php on line 169

Fatal error: Call to a member function getValue() on null behoben
  • Loading branch information
tobias authored and tobias committed Sep 6, 2016
1 parent a79aac7 commit d4a460a
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/d2u_addon_backend_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,13 @@ public static function form_linkfield($message_id, $fieldname, $article_id, $cla
print '<dl class="rex-form-group form-group">';
print '<dt><label>'. rex_i18n::msg($message_id) .'</label></dt>';
print '<dd><div class="input-group">';
$article_name = $article_id > 0 ? rex_article::get($article_id, $clang_id)->getValue('name') : "";
$article_name = 0;
if($article_id > 0) {
$article = rex_article::get($article_id, $clang_id);
if($article instanceof rex_article) {
$article_name = $article->getValue("name");
}
}
print '<input class="form-control" type="text" name="REX_LINK_NAME['. $fieldname .']" value="'. $article_name .'" id="REX_LINK_'. $fieldname .'_NAME" readonly="readonly">';
print '<input type="hidden" name="REX_INPUT_LINK['. $fieldname .']" id="REX_LINK_'. $fieldname .'" value="'. $article_id .'">';
print '<span class="input-group-btn">';
Expand Down

0 comments on commit d4a460a

Please sign in to comment.