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.
By mattcoady on
I'm trying to set up a views row using php filter.
Here's the devel dpm data:
http://i.imgur.com/IEA3ZTd.jpg
Here's what I use for the php filter Output value:
<img src="/sites/default/files/flag/<?php print ($data->field_field_country[0]['raw'][value]); ?>.png"/>
This is the error I get when I view the block on my homepage:
- Notice: Use of undefined constant value - assumed 'value' in __lambda_func() (line 5 of /home1/mattcoad/public_html/work/iaad/sites/all/modules/views_php/plugins/views/views_php_handler_field.inc(202) : runtime-created function).
- Notice: Use of undefined constant value - assumed 'value' in __lambda_func() (line 5 of /home1/mattcoad/public_html/work/iaad/sites/all/modules/views_php/plugins/views/views_php_handler_field.inc(202) : runtime-created function).
- Notice: Use of undefined constant value - assumed 'value' in __lambda_func() (line 5 of /home1/mattcoad/public_html/work/iaad/sites/all/modules/views_php/plugins/views/views_php_handler_field.inc(202) : runtime-created function).
- Notice: Use of undefined constant value - assumed 'value' in __lambda_func() (line 5 of /home1/mattcoad/public_html/work/iaad/sites/all/modules/views_php/plugins/views/views_php_handler_field.inc(202) : runtime-created function).
- Notice: Use of undefined constant value - assumed 'value' in __lambda_func() (line 5 of /home1/mattcoad/public_html/work/iaad/sites/all/modules/views_php/plugins/views/views_php_handler_field.inc(202) : runtime-created function).
- Notice: Use of undefined constant value - assumed 'value' in __lambda_func() (line 5 of /home1/mattcoad/public_html/work/iaad/sites/all/modules/views_php/plugins/views/views_php_handler_field.inc(202) : runtime-created function).
- Notice: Use of undefined constant value - assumed 'value' in __lambda_func() (line 5 of /home1/mattcoad/public_html/work/iaad/sites/all/modules/views_php/plugins/views/views_php_handler_field.inc(202) : runtime-created function).
- Notice: Use of undefined constant value - assumed 'value' in __lambda_func() (line 5 of /home1/mattcoad/public_html/work/iaad/sites/all/modules/views_php/plugins/views/views_php_handler_field.inc(202) : runtime-created function).
- Notice: Use of undefined constant value - assumed 'value' in __lambda_func() (line 5 of /home1/mattcoad/public_html/work/iaad/sites/all/modules/views_php/plugins/views/views_php_handler_field.inc(202) : runtime-created function).
- Notice: Use of undefined constant value - assumed 'value' in __lambda_func() (line 5 of /home1/mattcoad/public_html/work/iaad/sites/all/modules/views_php/plugins/views/views_php_handler_field.inc(202) : runtime-created function).
- Notice: Use of undefined constant value - assumed 'value' in __lambda_func() (line 5 of /home1/mattcoad/public_html/work/iaad/sites/all/modules/views_php/plugins/views/views_php_handler_field.inc(202) : runtime-created function).
- Notice: Use of undefined constant value - assumed 'value' in __lambda_func() (line 5 of /home1/mattcoad/public_html/work/iaad/sites/all/modules/views_php/plugins/views/views_php_handler_field.inc(202) : runtime-created function).
What does this mean and how can I fix it?
Comments
You need quotes around the
You need quotes around the word 'value'.
Thanks!
Thanks!