title: How to avoid PHP Notice "Undefined offset: 0" without checking each field of array
body: <p>i have the following array:</p>
  
  <pre><code>    $keyvisual_data = array(
          'video_file'            =&gt; $row-&gt;field_field_video[0]['rendered']['#item']['uri'],
          'bild_file'             =&gt; $row-&gt;field_field_bild[0]['rendered']['#item']['uri'],
          'subline_src'           =&gt; $row-&gt;_field_data['nid']['entity']-&gt;field_key_titel['und'][0]['safe_value'],
          'screenreader_src'      =&gt; $row-&gt;field_field_alt_screenreader[0]['rendered']['#markup'],
          'alt_src'               =&gt; $row-&gt;field_field_bild[0]['rendered']['#item']['alt']
      );
  </code></pre>
  
  <p>it might happen that some of the fields are not set, this is okay. in fact i am getting this PHP notice:</p>
  
  <blockquote>
    <p>Notice: Undefined offset: 0 in bafa_insert_keyvisual() ...........</p>
  </blockquote>
  
  <p>is it somehow possible to assign a default value to each key in case it is undefined WITHOUT checking each field of the array manually?</p>
  
  <p>thanks for help</p>