I like developing with errors enabled. Unfortunately the team who makes NS Cloner does not, which results in tons of errors when using NS Cloner pro. These are mostly trivial errors like uninitialized variables and deprecation warnings. Regardless, they make the plugin unusable for me.
Here is a quick plugin that disables PHP errors altogether when you’re in the NS Cloner Pro tab. Save this snippet as: /wp-content/mu-plugins/ns-cloner-fix.php
(If you don’t have an mu-plugins directory, create it)
<?php
/*
Plugin Name: NS Cloner error fix
Plugin URI:
Description: Disables error reporting while we're on the NS Cloner tab
Version: 2014.04.01
Author: khromov
Author URI: http://profiles.wordpress.org/khromov/
License: GPL2
*/
add_action('muplugins_loaded', function()
{
if(get_current_blog_id() === 1)
{
$siteurl = $_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING'];
if(strpos($siteurl, '/wp-admin/network/sites.php?page=ns-cloner-pro') !== false)
error_reporting(0);
}
});