| @@ -34,8 +34,12 @@ | ||
| 34 | 34 | */ |
| 35 | 35 | public function __construct() { |
| 36 | 36 | // Read all cached licenses! |
| 37 | 37 | $this->licenses = get_option(self::LICENSES_CACHE); |
| 38 | + // Make sure its array! | |
| 39 | + if (!is_array($this->licenses)) { | |
| 40 | + $this->licenses = array(); | |
| 41 | + } | |
| 38 | 42 | } |
| 39 | 43 | |
| 40 | 44 | /** |
| 41 | 45 | * put your comment there... |
| @@ -102,9 +106,9 @@ | ||
| 102 | 106 | * put your comment there... |
| 103 | 107 | * |
| 104 | 108 | */ |
| 105 | 109 | public function & getLicenses() { |
| 106 | - return $this->licenses ? $this->licenses : array(); | |
| 110 | + return $this->licenses; | |
| 107 | 111 | } |
| 108 | 112 | |
| 109 | 113 | /** |
| 110 | 114 | * Get list of all cached licenses that has |