You should enable debug mode in WordPress (
define('WP_DEBUG', true); in config.php).
Namely replace calls to
This is annoying when like me you develop themes and plugins and you get so many warning messages. Additionnally, your plugin might not be working anymore when the next WordPress version is released (or the following one).