artstorm/post-snippets — pull request #21 by om4james (2013-03-06 02:02:53+00:00)
Title: v2.1.2: Prevent PHP warning that occurs when no snippets exist

When the plugin is first activated, no snippets exist in the database.

This causes some PHP warnings such as the following:

Fixes PHP Warning: Invalid argument supplied for foreach() in wp-content/plugins/post-snippets/post-snippets.php on line 522

This is because the code assumes that the `post_snippets_options` wp_option always exists and is an array.

This PR fixes that, by ensuring the default value is array().