Hi,
The code below triggers a fatal error in PHP 8 and a warning in PHP 7.4 or lower.
add_filter( 'rwmb_meta_boxes', function ( $meta_boxes ) {
$meta_boxes[] = [
'id' => 'general',
'title' => 'General',
'settings_pages' => 'my-options',
'context' => 'normal',
'fields' => [
[
'id' => 'my_group',
'type' => 'group',
'clone' => false,
'fields' => [
[
'name' => 'Backup',
'type' => 'backup',
],
]
]
]
];
return $meta_boxes;
} );
( ! ) Fatal error: Uncaught TypeError: get_class(): Argument #1 ($object) must be of type object, null given in /(...)/meta-box-aio/vendor/meta-box/mb-settings-page/src/BackupField.php on line 4
It works fine without the group field.
Here's a quick video displaying the bug: https://youtu.be/GylF4X20kyE
And a test plugin: https://dl.dropbox.com/s/6weozndvcc6jbo3/test-plugin.zip
I look forward to the resolution of the issue, thanks.