0

I am building a simple plugin in wordpress which actually works quite well but when I activate my plugin it get this message

The plugin generated 23 characters of unexpected output during activation. If you notice “headers already sent” messages, problems with syndication feeds or other issues, try deactivating or removing this plugin.

Now of course I want to find out what causes the problem.

This is the top part of my plugins' sourcecode:

<?php
/*
Plugin Name: Staticbox
Plugin URI: XXXXX
Description: Staticbox - Eine einfache Content-Box zum einbinden.
Version: 0.3
Author: XXXXX
Author URI: XXXXX
Update Server: XXXXX
Min WP Version: 3.5.2
Max WP Version: 3.5.3
*/
register_activation_hook( __FILE__, 'staticbox_activate' );
register_deactivation_hook( __FILE__, 'staticbox_deactivate' );
global $wpdb;
$plugins_url = plugins_url('', __FILE__);
$table_name = $wpdb->base_prefix."staticbox";

/*** WIRD BEIM AKTIVIEREN AUSGEFÜHRT ***/
function staticbox_activate() {
    global $wpdb;
    $sql = "CREATE TABLE IF NOT EXISTS `".$wpdb->base_prefix."staticbox` (`content` text NOT NULL)";
    $wpdb->query($sql);
}

/*** WIRD BEIM DEAKTIVIEREN AUSGEFÜHRT ***/
function staticbox_deactivate() {
    global $wpdb;
    $sql = "DROP TABLE `".$wpdb->base_prefix."staticbox`";
    $wpdb->query($sql);
}

Where does it generate output? I don't see it.

Manticore
  • 1,284
  • 16
  • 38

0 Answers0