Why is this code to programmatically create a content type failing? &lt;?php

            function news_article_install() {

                // Define node type
                $news_article = array(
                    'type' =&gt; 'news_article',
                    'name' =&gt; 'News Article',
                    'base' =&gt; 'node_content',
                    'description' =&gt; 'A news article content type',
                    'body_label' =&gt; 'Article Text',
                    'custom' =&gt; 1,
                    'title' =&gt;  1,
                    'title_label'   =&gt;  'Headline'
                );

                // Save content type
                $news_article = node_type_set_defaults($news_article);
                node_type_save($news_article);
                node_add_body_field($news_article);
            }


?&gt;


Edit: I've simplified the function as much as possible, still having errors. The errors now are...

Warning: Cannot use a scalar value as an array in _node_types_build() (line 689 of /Users/ryan/Sites/Drupal/modules/node/node.module).
Warning: Cannot use a scalar value as an array in _node_types_build() (line 689 of /Users/ryan/Sites/Drupal/modules/node/node.module).
Warning: Cannot use a scalar value as an array in _node_types_build() (line 689 of /Users/ryan/Sites/Drupal/modules/node/node.module).
Warning: Cannot use a scalar value as an array in _node_types_build() (line 689 of /Users/ryan/Sites/Drupal/modules/node/node.module).
You have node_type_save and node_add_body_field in the wrong order. You can always steal ideas from http://api.drupal.org/api/drupal/profiles--standard--standard.install/function/standard_install/7