Using $this->blocks without declaring a @var array $blocks in the class generates a deprecated error in php8.2.
Exception - Unknown error type: Creation of dynamic property block_multiblock::$blocks is deprecated in [dirroot]/blocks/multiblock/block_multiblock.php on line 93
Debug info: Error code: generalexceptionmessage
Stack trace:
line 157 of /lib/behat/lib.php: Exception thrown
line 93 of /blocks/multiblock/block_multiblock.php: call to behat_error_handler()
line 152 of /blocks/multiblock/block_multiblock.php: call to block_multiblock->load_multiblocks()
line 337 of /blocks/moodleblock.class.php: call to block_multiblock->get_content()
line 231 of /blocks/moodleblock.class.php: call to block_base->formatted_contents()
line 215 of /blocks/multiblock/block_multiblock.php: call to block_base->get_content_for_output()
line 1231 of /lib/blocklib.php: call to block_multiblock->get_content_for_output()
line 1289 of /lib/blocklib.php: call to block_manager->create_block_contents()
line 377 of /lib/blocklib.php: call to block_manager->ensure_content_created()
line 4130 of /lib/outputrenderers.php: call to block_manager->region_has_content()
line 28 of /theme/classic/layout/columns.php: call to core_renderer->blocks()
line 1477 of /lib/outputrenderers.php: call to include()
line 1403 of /lib/outputrenderers.php: call to core_renderer->render_page_layout()
line 290 of /course/view.php: call to core_renderer->header()
Using $this->blocks without declaring a
@var array $blocks
in the class generates a deprecated error in php8.2.Exception - Unknown error type: Creation of dynamic property block_multiblock::$blocks is deprecated in [dirroot]/blocks/multiblock/block_multiblock.php on line 93
Error code: generalexceptionmessage
Adding this to the code, fixes the error: