Fixed display of PHP Notice due to arrays being passed into preg_replace

During a repeat statement in the template, the current acting $variables object is augmented with the correct scope for the node, while leaving the original scope intact. This caused a notice to be thrown in the preg_replace because an array that consisted of arrays was being provided as the replace value.  The simple fix is to find all arrays and turn them into empty strings.