Index: trunk/phase3/includes/BagOStuff.php |
— | — | @@ -863,9 +863,11 @@ |
864 | 864 | * @return bool |
865 | 865 | */ |
866 | 866 | public function set( $key, $value, $expire = 0 ) { |
867 | | - wincache_ucache_set( $key, serialize( $value ), $expire ); |
| 867 | + $result = wincache_ucache_set( $key, serialize( $value ), $expire ); |
868 | 868 | |
869 | | - return true; |
| 869 | + /* wincache_ucache_set returns an empty array on success if $value |
| 870 | + was an array, bool otherwise */ |
| 871 | + return ( is_array( $value ) && $result === array() ) || $result; |
870 | 872 | } |
871 | 873 | |
872 | 874 | /** |
— | — | @@ -886,6 +888,10 @@ |
887 | 889 | $list = $info['ucache_entries']; |
888 | 890 | $keys = array(); |
889 | 891 | |
| 892 | + if ( is_null( $list ) ) { |
| 893 | + return array(); |
| 894 | + } |
| 895 | + |
890 | 896 | foreach ( $list as $entry ) { |
891 | 897 | $keys[] = $entry['key_name']; |
892 | 898 | } |