Fatal error about wp_install_maybe_enable_pretty_permalinks()
-
Hi,
I want to add a new database table. so I use
require( ABSPATH . 'wp-admin/includes/upgrade.php' ); if ($wpdb->get_var("SHOW TABLES LIKE '$new_uam_table'") != $new_uam_table) { $sql = "CREATE TABLE IF NOT EXISTS ".$new_uam_table." ( <code>ID</code> int(11) NOT NULL AUTO_INCREMENT, <code>groupname</code> tinytext NOT NULL, <code>groupdesc</code> text NOT NULL, <code>read_access</code> tinytext NOT NULL, <code>write_access</code> tinytext NOT NULL, <code>ip_range</code> mediumtext NULL, PRIMARY KEY (<code>ID</code>) ) ". $snxCharsetCollate .";"; dbDelta($sql); }
When I activated my plugin, it got a fatal error:
Plugin could not be activated because it triggered a fatal error.
Fatal error: Cannot redeclare wp_install_maybe_enable_pretty_permalinks() (previously declared in /home/www/wordpress/wp-admin/includes/upgrade.php:279) in /home/www/wordpress/wp-admin/includes/upgrade.php on line 347
I believe the function “wp_install_maybe_enable_pretty_permalinks()” should be included in
if ( !function_exists('wp_install_maybe_enable_pretty_permalinks') ) : function wp_install_maybe_enable_pretty_permalinks() {...} endif;
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Fatal error about wp_install_maybe_enable_pretty_permalinks()’ is closed to new replies.