Help to update content of a structure with kirby?

I try another things based on one of your answer (How to update a structure via the API?) on the forum, just to test an update without changing content :

Kirby::plugin('idees/mailling', [
     'routes' => function($kirby) {
     return [
     [
      'pattern' => '/evenements/mailling',
      'action' => function () use ($kirby){

           $eventpages = $kirby->site()->pages()->find("evenements")->children();

            $result = array();

            foreach($eventpages as $event){

                $mblocks =$event->Maillingblock()->toYaml();

               // just to test, filtering later
                $not_empty_block = $mblocks->map(function($x) {
                    return $x;
                });
                $data = Data::encode($not_empty_block, 'yaml');
                array_push($result,$data);         
      }
          return [$result];
        }

But i have a php error returned by kirby, i miss something @texnixe ?

**Fatal error**: Allowed memory size of 134217728 bytes exhausted (tried to allocate 249856 bytes) in **/home/reyman/Projets/Guix-ified/webdev/site-umr-idee/kirby/dependencies/spyc/Spyc.php** on line **251**

**Fatal error**: Allowed memory size of 134217728 bytes exhausted (tried to allocate 122880 bytes) in **/home/reyman/Projets/Guix-ified/webdev/site-umr-idee/vendor/filp/whoops/src/Whoops/Util/SystemFacade.php** on line **77**