Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
In views_slideshow_cycle.theme.inc, lines 22 through 27 look like this:
foreach ($settings as $key => $value) {
if (is_string($value)) {
if (stristr($value, "\n")) {
$value = str_replace("\n", ' ', $value);
}
$value = trim($value);
The if statement checking value against '\n' isn't needed if you're just doing a replace on the value. Just run the replacement.
Also, the check for '\n' is case insensitive, where as the replace is case sensitive. It should be changed to use stri_replace instead if you want to match the implied logic of the if statement.
It should look more like this:
foreach ($settings as $key => $value) {
if (is_string($value)) {
$value = stri_replace("\n", ' ', $value);
$value = trim($value);
Unless I'm missing something in having that if statement present.
Thanks,
Comments
Comment #1
minorOffense CreditAttribution: minorOffense commentedComment #2
minorOffense CreditAttribution: minorOffense commentedSorry, that should read
Comment #3
redndahead CreditAttribution: redndahead commentedA patch was committed. Thank you.