Support » Plugin: Plugin Test Drive » plugin_sandbox_scrape – error because function was redeclared

  • The following error occurs when activating Plugin Test Drive on WordPress version 4.7.3

    Fatal error: Cannot redeclare plugin_sandbox_scrape() (previously declared in /home/xxxxxx/public_html/wp-admin/includes/plugin.php:1880) in /home/xxxxxx/public_html/wp-content/plugins/plugin-test-drive/admin/options.php on line 256

    Current Source Code in options.php

    	function plugin_sandbox_scrape( $ptd_plugin ) {
    		echo '<div style="font-size:14px">';include( WP_PLUGIN_DIR . '/' . $ptd_plugin );echo '</div>';
    	}
    	plugin_sandbox_scrape( $ptd_plugin );

    Suggested Change

    	function ptd_plugin_sandbox_scrape( $ptd_plugin ) {
    		echo '<div style="font-size:14px">';include( WP_PLUGIN_DIR . '/' . $ptd_plugin );echo '</div>';
    	}
    	ptd_plugin_sandbox_scrape( $ptd_plugin );
    • This topic was modified 3 years, 9 months ago by Mike Meinz.
  • The topic ‘plugin_sandbox_scrape – error because function was redeclared’ is closed to new replies.