Fixed infinite loop resulting from race condition (#241)
Fixed infinite loop resulting from race condition (#241)

Credit to @ideepblue. Original report below:
When I try to extend the ControlLibrary by listen pages.builder.registerControls, I found I cannot call function ControlLibrary->getControlInfo() because it will result loop-nesrted call ControlLibrary->getControlInfo() again and again.

After I researched the code of builder-plugin, I found the Event::fire('pages.builder.registerControls', [$this]); before $this->groupedControls has been initalized. Therefore I changed their order, and bug has been fixed.
rainlab/builder-plugin,rainlab/builder-plugin,rainlab/builder-plugin