title: MODx & Gallery component - how to handle non-existing albums?
body: <p>Referrencing non-existing albums in the Gallery component results with the following warning &amp; error:</p>
  
  <pre><code>Warning: Invalid argument supplied for foreach() in 
  /home/user/domain.com/core/cache/includes/elements/modsnippet/17.include.cache.php on line 106
  
  Fatal error: Cannot use string offset as an array in 
  /home/user/domain.com/core/cache/includes/elements/modsnippet/17.include.cache.php on line 165
  </code></pre>
  
  <p>And here is how I reference albums:</p>
  
  <pre><code>[[!Gallery? &amp;album=`[[*alias]]` &amp;limit=`20` &amp;thumbWidth=`90` &amp;thumbHeight=`90`]]
  </code></pre>
  
  <p>Album names match page's aliases. Everything works fine if albums exist - I would like to display blank album (no content), if no matches found.</p>
  
  <p>Any ideas? I am using MODX Revolution 2.2.4-pl (traditional). </p>
  
  <p>Thanks, Luke</p>