ob_end_flush error when using wpdb in plugin

I created a small plugin to test database interactions in wordpress. I have a small function that inputs the arguments to the table.

If i call my function in a themefile it inputs my test values to my table, but if i call it from another plugin i get this error:

Read More

Notice: ob_end_flush(): failed to send buffer of zlib output compression (0) in /…/wp-includes/functions.php on line 2504

I have no idea what this error means, can anyone shed some light on it?

edit: I use MAMP with PHP 5.4.4

edit2:

function test_db_function($name, $message){
  global $wpdb;
  $table_name = $wpdb->prefix . "testDB";

  if( $name == '' || $message == '' || !isset($name) || !isset($message)) {
    //return 0;
  }
  else{
    $rows_affected = $wpdb->insert( $table_name, array( 
      'time' => time(), 
      'name' => $name, 
      'text' => $message) );
  }
}

Related posts

Leave a Reply

1 comment

  1. You did not provide that information, so I have to guess a little bit: You are using PHP 5.4 and zlib.output_compression is on on your server?

    Then you just stumbled upon bug #18525. Possible solutions:

    • Disable zlib.output_compression.
    • Apply the patch provided there and report back on that ticket if it works.
    • Disable notices.

    What you can do when you decide to release the plugin to the public is another issue …