PHP Notice: Undefined offset: 0 in /wordpress/wp-includes/plugin.php and Register Settings API change

https://make.wordpress.org/core/2016/10/26/registering-your-settings-in-wordpress-4-7/

The register_setting() function signature changed in v4.7 allowing an array for the third option in place of a callback function in prior versions. Passing an array to register_setting() in WordPress v4.6.x and earlier will result in the errors above.

WordPress v4.6.8 function definition:
https://github.com/WordPress/WordPress/blob/1aa173010736085a921beb10fd420d6d863419a5/wp-admin/includes/plugin.php#L1767-L1795

/**
 * Register a setting and its sanitization callback
 *
 * @since 2.7.0
 *
 * @global array $new_whitelist_options
 *
 * @param string $option_group A settings group name. Should correspond to a whitelisted option key name.
 *  Default whitelisted option key names include "general," "discussion," and "reading," among others.
 * @param string $option_name The name of an option to sanitize and save.
 * @param callable $sanitize_callback A callback function that sanitizes the option's value.
 */