I got rid of the error by adding this
Code:
        foreach ($attribute_list as $optid => $optvalid) {

          if (true) {
			  // mc12345678 Here is one place where verification can be performed as to whether a particular attribute should be added.  This is probably the best place to do the review because all aspects of the attribute are available.
		   if (is_numeric ($optvalid)) {
           $attributes[] = $optvalid;
		   }
          }
        }
If the text attribute is added to the SBA table with a quantity the order now completes with the text attribute added to the cart. When the order is submitted I receive a low stock email with a stock value of -1. All attributes defined in the sba table have a positive stock value.

If the text attribute is removed from the SBA table it won't allow checkout because an attribute is out of stock.

I guess there must be a better way.