Problem/Motivation
One comment on #2863904: Typogrify does not handle langcode properly mentions a PHP message
Notice: Undefined variable: ascii_to_unicode in Drupal\typogrify\Plugin\Filter\TypogrifyFilter->tips() (line 460 of modules/contrib/typogrify/src/Plugin/Filter/TypogrifyFilter.php).
when viewing the help text for this module.
Proposed resolution
This notice comes from the code
if ($settings['quotes'][$ascii]) {
$ascii_to_unicode .= $this->t('Converts @ascii to @unicode', array(
'@ascii' => $ascii,
'@unicode' => $unicode,
));
$output .= "<li>$ascii_to_unicode</li>\n";
}
in the file src/Plugin/Filter/TypogrifyFilter.php.
I think all we have to do is replace the .= with =.
Remaining tasks
User interface changes
Fewer PHP messages.
API changes
None
Data model changes
None
Comments
Comment #2
sastha commentedComment #3
govind.maloo commentedChanged ".=" to "=" as there is no other place using this variable.
Thanks
Govind
Comment #4
benjifisherThe patch looks right, so I will call this reviewed but not tested by the community.
Comment #5
suparnaa.dey commentedI have tested @govind.maloo 's patch #3 and can't see this message anymore. RTBC
Comment #6
benjifisherBased on #4 and #5, I think we can change the status.
Comment #7
benjifisherComment #8
brightboldAfter applying this patch, I now get this error:
Sorry to rain on the RTBC parade.
Comment #9
benjifisher@BrightBold:
That is a separate problem, and we already have an issue for it: #3024642: PHP warning when viewing help text. There is already a patch on that issue that hides the problem, but I marked it NW because I want to see a better fix.
Back to RTBC.
Comment #11
benjifisherFixed (and it was less than a year since the previous comment).