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.
views_php_handler_field->render() adds space to both sides of output.
i.e. Setting the "Output code" field to:
<?php
echo 'Hello';
?>
Will produce:
Hello
Note the space before and after the Hello.
This can potentially cause problems; for example, when using a php field as a token for the link path for another field.
See patch in Comment #1 for a fix.
Comment | File | Size | Author |
---|---|---|---|
#1 | views_php-extra-spaces-1126482-1.patch | 682 bytes | setvik |
Comments
Comment #1
setvik CreditAttribution: setvik commentedComment #2
infojunkieThanks for the report - fixed on D6 (which I maintain).
Comment #3
casey CreditAttribution: casey commentedFixed for D7