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.

CommentFileSizeAuthor
#1 views_php-extra-spaces-1126482-1.patch682 bytessetvik
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

setvik’s picture

infojunkie’s picture

Thanks for the report - fixed on D6 (which I maintain).

casey’s picture

Status: Needs review » Fixed

Fixed for D7

Status: Fixed » Closed (fixed)

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