• Using this plugin on a task, came across this little gem:

    function name_save($post_name) {
    	if ($_POST['post_type'] == 'incsub_wiki' && empty($post_name)) {
    		$post_name = $_POST['post_title'];
    	}
    
    	return $post_name;
    }

    Needs to check if both array keys are set first, before assuming they are, like so:

    function name_save($post_name) {
    	if ( isset( $_POST['post_type'] ) && $_POST['post_type'] == 'incsub_wiki' && empty($post_name)) {
    		if ( ! isset( $_POST['post_title'] ) ) {
    			return $post_name;
    		}
    		$post_name = $_POST['post_title'];
    	}
    
    	return $post_name;
    }

    Please fix this, my debug.log is getting flooded during a WP-CLI import…

    https://wordpress.org/plugins/wordpress-wiki-plugin/

Viewing 1 replies (of 1 total)
  • Hey there Jerry,

    Hope you’re well today!

    I’ll definitely pass on this to our plugin developer so he can take a look and possibly add this to one of the future versions of the plugin.

    Thank you for reporting this and taking time to offer a fix 🙂

    Have a great day!

    Cheers,
    Bojan

Viewing 1 replies (of 1 total)
  • The topic ‘[ PATCH ] – Undefined index post_type in wiki/wiki.php L1816’ is closed to new replies.