Skip to content
Snippets Groups Projects

Issue #3280848: Shortcut links without a title cause deprecation notices.

7 files
+ 138
2
Compare changes
  • Side-by-side
  • Inline
Files
7
@@ -45,7 +45,8 @@ public function __construct(PathValidatorInterface $path_validator) {
*/
public function addShortcutLinkInline(ShortcutSetInterface $shortcut_set, Request $request) {
$link = $request->query->get('link');
$name = $request->query->get('name');
$name = !empty($request->query->get('name')) ? $request->query->get('name') : '(' . $this->t('Empty', [], ['langcode' => $shortcut_set->language()->getId()]) . ')';
if (parse_url($link, PHP_URL_SCHEME) === NULL && $this->pathValidator->isValid($link)) {
$shortcut = $this->entityTypeManager()->getStorage('shortcut')->create([
'title' => $name,
Loading