Plugin Directory

Changeset 452293


Ignore:
Timestamp:
10/18/2011 03:48:48 AM (14 years ago)
Author:
beezeee
Message:

added checks before foreach statements on 137 and 138

Location:
category-sticky-posts
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • category-sticky-posts/tags/0.11/bz_category_sticky.php

    r448928 r452293  
    55 Description: Set sticky posts for individual category archives
    66 Author: Brian Zeligson
    7  Version: 0.1
     7 Version: 0.11
    88 Author URI: http://www.workinginboxershorts.com
    99
     
    135135      $bz_post_sticky_categories = $_POST['bz_post_sticky_categories'];
    136136     
    137       foreach ($bz_post_sticky_categories as $bz_post_sticky_category) $this->bz_sticky_categories[$bz_post_sticky_category][$post->ID] = 'sticky';
    138       foreach ($this->bz_sticky_categories as $key => $bz_sticky_category) if (isset($bz_sticky_category[$post->ID]) and !in_array($key, $bz_post_sticky_categories)) unset($this->bz_sticky_categories[$key][$post->ID]);
     137      if (is_array($bz_post_sticky_categories)) {foreach ($bz_post_sticky_categories as $bz_post_sticky_category) $this->bz_sticky_categories[$bz_post_sticky_category][$post->ID] = 'sticky';}
     138      if (is_array($this->bz_sticky_categories)) {foreach ($this->bz_sticky_categories as $key => $bz_sticky_category) if (isset($bz_sticky_category[$post->ID]) and !in_array($key, $bz_post_sticky_categories)) unset($this->bz_sticky_categories[$key][$post->ID]);}
    139139      update_option(WPBZCSP, $this->bz_sticky_categories);
    140140    }
  • category-sticky-posts/tags/0.11/readme.txt

    r448928 r452293  
    55Requires at least: 2.9.1
    66Tested up to: 3.2.1
    7 Stable tag: root
     7Stable tag: 0.11
    88
    99Allows you to set Sticky posts for individual category archives.
  • category-sticky-posts/trunk/bz_category_sticky.php

    r448928 r452293  
    55 Description: Set sticky posts for individual category archives
    66 Author: Brian Zeligson
    7  Version: 0.1
     7 Version: 0.11
    88 Author URI: http://www.workinginboxershorts.com
    99
     
    135135      $bz_post_sticky_categories = $_POST['bz_post_sticky_categories'];
    136136     
    137       foreach ($bz_post_sticky_categories as $bz_post_sticky_category) $this->bz_sticky_categories[$bz_post_sticky_category][$post->ID] = 'sticky';
    138       foreach ($this->bz_sticky_categories as $key => $bz_sticky_category) if (isset($bz_sticky_category[$post->ID]) and !in_array($key, $bz_post_sticky_categories)) unset($this->bz_sticky_categories[$key][$post->ID]);
     137      if (is_array($bz_post_sticky_categories)) {foreach ($bz_post_sticky_categories as $bz_post_sticky_category) $this->bz_sticky_categories[$bz_post_sticky_category][$post->ID] = 'sticky';}
     138      if (is_array($this->bz_sticky_categories)) {foreach ($this->bz_sticky_categories as $key => $bz_sticky_category) if (isset($bz_sticky_category[$post->ID]) and !in_array($key, $bz_post_sticky_categories)) unset($this->bz_sticky_categories[$key][$post->ID]);}
    139139      update_option(WPBZCSP, $this->bz_sticky_categories);
    140140    }
  • category-sticky-posts/trunk/readme.txt

    r448928 r452293  
    55Requires at least: 2.9.1
    66Tested up to: 3.2.1
    7 Stable tag: root
     7Stable tag: 0.11
    88
    99Allows you to set Sticky posts for individual category archives.
Note: See TracChangeset for help on using the changeset viewer.