• When in debug mode for version 2.1.3 of the plugin, four similar errors are shown, as follows:

    Strict Standards: Declaration of Walker_PostExpirator_Category_Checklist::start_lvl() should be compatible with Walker::start_lvl(&$output, $depth = 0, $args = Array) in /Volumes/Data/OneDrive/Sites/f3c/wp-content/plugins/post-expirator/post-expirator.php on line 1291

    Strict Standards: Declaration of Walker_PostExpirator_Category_Checklist::end_lvl() should be compatible with Walker::end_lvl(&$output, $depth = 0, $args = Array) in /Volumes/Data/OneDrive/Sites/f3c/wp-content/plugins/post-expirator/post-expirator.php on line 1291

    Strict Standards: Declaration of Walker_PostExpirator_Category_Checklist::start_el() should be compatible with Walker::start_el(&$output, $object, $depth = 0, $args = Array, $current_object_id = 0) in /Volumes/Data/OneDrive/Sites/f3c/wp-content/plugins/post-expirator/post-expirator.php on line 1291

    Strict Standards: Declaration of Walker_PostExpirator_Category_Checklist::end_el() should be compatible with Walker::end_el(&$output, $object, $depth = 0, $args = Array) in /Volumes/Data/OneDrive/Sites/f3c/wp-content/plugins/post-expirator/post-expirator.php on line 1291

    Also, when saving a post or page after setting an expiration, the following errors occur:

    Warning: Cannot modify header information – headers already sent by (output started at /Volumes/Data/OneDrive/Sites/f3c/wp-content/plugins/post-expirator/post-expirator.php:1291) in /Volumes/Data/OneDrive/Sites/f3c/wp-admin/post.php on line 235

    Warning: Cannot modify header information – headers already sent by (output started at /Volumes/Data/OneDrive/Sites/f3c/wp-content/plugins/post-expirator/post-expirator.php:1291) in /Volumes/Data/OneDrive/Sites/f3c/wp-includes/pluggable.php on line 1121

    https://www.ads-software.com/plugins/post-expirator/

Viewing 4 replies - 1 through 4 (of 4 total)
  • These errors occur for me when using PHP 5.4

    Thread Starter Mark Freedman

    (@markfreedman)

    I’m using PHP 5.5.10.

    Rose

    (@thorned-rose)

    Maybe this might help? – https://www.ads-software.com/support/topic/strict-standards-error-message-1?replies=1

    Hi, could You please update the code to remove strict standards errors? It affects lines 1257 to 1291 of post-expirator.php
    is
    function start_lvl(&$output, $depth, $args) {
    should be
    function start_lvl(&$output, $depth = 0, $args = array()) {
    full, changed code:

    class Walker_PostExpirator_Category_Checklist extends Walker {
    	var $tree_type = 'category';
    	var $db_fields = array ('parent' => 'parent', 'id' => 'term_id'); //TODO: decouple this
    
    	var $disabled = '';
    
    	function setDisabled() {
    		$this->disabled = 'disabled="disabled"';
    	}
    
    	function start_lvl(&$output, $depth = 0, $args = array()) {
    		$indent = str_repeat("\t", $depth);
    		$output .= "$indent<ul class='children'>\n";
    	}
    
    	function end_lvl(&$output, $depth = 0, $args = array()) {
    		$indent = str_repeat("\t", $depth);
    		$output .= "$indent</ul>\n";
    	}
    
    	function start_el(&$output, $category, $depth = 0, $args = array(), $current_object_id = 0) {
    		extract($args);
    		if ( empty($taxonomy) )
    			$taxonomy = 'category';
    
    		$name = 'expirationdate_category';
    
    		$class = in_array( $category->term_id, $popular_cats ) ? ' class="expirator-category"' : '';
    		$output .= "\n<li id='expirator-{$taxonomy}-{$category->term_id}'$class>" . '<label class="selectit"><input value="' . $category->term_id . '" type="checkbox" name="'.$name.'[]" id="expirator-in-'.$taxonomy.'-' . $category->term_id . '"' . checked( in_array( $category->term_id, $selected_cats ), true, false ) . disabled( empty( $args['disabled'] ), false, false ) . ' '.$this->disabled.'/> ' . esc_html( apply_filters('the_category', $category->name )) . '</label>';
    	}
    
    	function end_el(&$output, $category, $depth = 0, $args = array()) {
    		$output .= "</li>\n";
    	}
    }

    Also, usually the “Cannot modify header information” error comes from the presence of white space in the code: https://codex.www.ads-software.com/FAQ_Troubleshooting#How_do_I_solve_the_Headers_already_sent_warning_problem.3F

    Thread Starter Mark Freedman

    (@markfreedman)

    Thanks, @Thorned Rose. I’ll have to try making these changes. Hopefully the plugin’s author will “officially” make these changes as well.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Errors You May Not Have Noticed (Debug Mode)’ is closed to new replies.