Error in Views override template "Notice: Undefined offset: 1 in include()" So I am theming a View with a template in my theme folder.

I am getting this error message:

"Notice: Undefined offset: 1 in include()"

This is the code:

&lt;?php print ($fields["title"]-&gt;content); ?&gt;


I've tried adding an IF statement like below (is my syntax correct???) and clearing the cache but the issue persists:

&lt;?php if ($fields["title"]-&gt;content) { print ($fields["title"]-&gt;content); } ?&gt;


P.S. the field is printing, it's just that there is an error message displayed in addition.

Also, by the way, I am using views-view-fields.tpl.php
You need to use isset() to avoid such notices:

&lt;?php if (isset($fields["title"])) { print ($fields["title"]-&gt;content); } ?&gt;