Support » Plugin: CMS Tree Page View » Fix for three non-fatal errors

  • Resolved damienwhaley

    (@damienwhaley)


    Hi,

    I’m using cms-tree-page-view and also blackbox (for development) and blackbox was showing three errors in cms_tpv_get_options() function. I’ve fixed these errors and the code is below (this is in functions.php):

    /**
     * Load settings
     * @return array with options
     */
    function cms_tpv_get_options() {
    	$arr_options = (array) get_option('cms_tpv_options');
    	if (array_key_exists('dashboard', $arr_options)) {
    		$arr_options['dashboard'] = (array) @$arr_options['dashboard'];
    	}
    	else {
    		$arr_options['dashboard'] = array();
    	}
    	if (array_key_exists('menu', $arr_options)) {
    		$arr_options['menu'] = (array) @$arr_options['menu'];
    	}
    	else {
    		$arr_options['menu'] = array();
    	}
    	if (array_key_exists('postsoverview', $arr_options)) {
    		$arr_options['postsoverview'] = (array) @$arr_options['postsoverview'];
    	}
    	else {
    		$arr_options['postsoverview'] = array();
    	}
    	return $arr_options;
    }

    Can you please take a look and let me know if you think it’s OK, and if so, can you please merge it? Sorry if this is not the right way to do this, I’m only new here.

    Cheers,

    /Damien

    http://wordpress.org/extend/plugins/cms-tree-page-view/

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Fix for three non-fatal errors’ is closed to new replies.