I have a simple View that has a global custom text field with the value of "hi". I have a global PHP field that tries to print this value with echo $row->nothing;
.
As this is the strange name that's listed in the available variables of the PHP field. The result is nothing. If I try to dump the content of $row
with echo var_dump($row);
.
The output is the following.
{ ["nothing"]=> NULL }
When I try the same thing with a Math Expression instead of a Custom Text, it works as expected, printing out the result of the expression. Some fields seem to work, while others don't. Unfortunately the ones I want to use don't work.
I found Why does Views PHP give me NULL for $row->path? discussing a similar problem, but the given answer did not help in solving the problem I've described.
I'm using Drupal 7.77, Views 7.x-3.29, and Views PHP 7.x-1.1.