Replace

bb_register_activation_hook(str_replace(array(str_replace("/","\\",BB_PLUGIN_DIR),str_replace("/","\\",BB_CORE_PLUGIN_DIR)),array("user#","core#"),__FILE__), 'bb_attachments_install');

with

bb_register_activation_hook( __FILE__, 'bb_attachments_install' );

to fix the database problem in bbPress Attachments.

Why does making code shorter usually fix things?

Advertisements