Problem/Motivation

The main site where I'm using Forward doesn't actually have a logo. 😅 They just use text with a specific font, and that's more appropriate for their needs than a graphic. However, template_preprocess_forward() is currently written to assume there must be a logo.

Steps to reproduce

Install forward on a site where neither the forward_email_logo setting nor theme_get_setting('logo.url') have a value. Try to forward anything. Behold:

Deprecated function: strpos(): Passing null to parameter #1 ($haystack) of type string is deprecated in Drupal\Component\Utility\UrlHelper::isExternal() (line 271 of core/lib/Drupal/Component/Utility/UrlHelper.php).

Deprecated function: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in Drupal\Component\Utility\UrlHelper::isExternal() (line 273 of core/lib/Drupal/Component/Utility/UrlHelper.php).

Relevant backtrace is:

Drupal\Component\Utility\UrlHelper::isExternal() (Line: 113)
template_preprocess_forward()
...

Proposed resolution

Handle the case that there is no logo inside template_preprocess_forward()

Remaining tasks

User interface changes

API changes

Data model changes

CommentFileSizeAuthor
#2 3579010-2.patch1.1 KBdww

Issue fork forward-3579010

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

dww created an issue. See original summary.

dww’s picture

Status: Active » Needs review
StatusFileSize
new1.1 KB

Since there's no .gitlab-ci.yml here (yet), uploading as a raw patch for now.

  • dww committed ccb70639 on 4.0.x
    fix: #3579010 template_preprocess_forward() assumes there is a theme...

dww’s picture

Status: Needs review » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.