During the execution all errors are saved into an array like this:
$this->errors[$section] = $e->getMessage();
The thing is that, after the execution, I have to publish all sections included the ones that experimented an error concatenated with the error. When I try to to:
echo $this->errors[$section];
this is the warning I get:
Warning: Illegal offset type in ....
The solution described at Dynamic access to a PHP array didn't help.