Use empty so we are safe from a PHP Notice if $stderr isn't defined
Don't re-use the $error in child foreach