Be careful with Views Custom Field
I was tearing my hair out over mysterious bugs in my recent Drupal project. Our complex views pages, which used Views custom field extensively, were constantly breaking. The php field output could break when new CCK field was added to some node type, or some value was selected in views exposed filters.
The code of my phpfields was very simple, something like this:
<span style="color: #000000"><span style="color: #0000BB"><?php<br></span><span style="color: #007700">if (</span><span style="color: #0000BB">$data</span><span style="color: #007700">-></span><span style="color: #0000BB">field_node_status_value </span><span style="color: #007700">> </span><span style="color: #0000BB">2</span><span style="color: #007700">) {<br> echo </span><span style="color: #0000BB">l</span><span style="color: #007700">(</span><span style="color: #DD0000">"Some action"</span><span style="color: #007700">, </span><span style="color: #DD0000">'test/url'</span><span style="color: #007700">);<br>}<br></span><span style="color: #0000BB">?></span></span>