Changeset 3798 for trunk/wp-includes/cache.php
- Timestamp:
- 05/26/2006 09:14:36 PM (20 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/cache.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/cache.php
r3576 r3798 48 48 } 49 49 50 define('CACHE_SERIAL_HEADER', "<?php\n/ /");51 define('CACHE_SERIAL_FOOTER', " \n?".">");50 define('CACHE_SERIAL_HEADER', "<?php\n/*"); 51 define('CACHE_SERIAL_FOOTER', "*/\n?".">"); 52 52 53 53 class WP_Object_Cache { … … 159 159 } 160 160 161 $this->cache[$group][$id] = unserialize( substr(@ file_get_contents($cache_file), strlen(CACHE_SERIAL_HEADER), -strlen(CACHE_SERIAL_FOOTER)));161 $this->cache[$group][$id] = unserialize(base64_decode(substr(@ file_get_contents($cache_file), strlen(CACHE_SERIAL_HEADER), -strlen(CACHE_SERIAL_FOOTER)))); 162 162 if (false === $this->cache[$group][$id]) 163 163 $this->cache[$group][$id] = ''; … … 333 333 334 334 $temp_file = tempnam($group_dir, 'tmp'); 335 $serial = CACHE_SERIAL_HEADER. serialize($this->cache[$group][$id]).CACHE_SERIAL_FOOTER;335 $serial = CACHE_SERIAL_HEADER.base64_encode(serialize($this->cache[$group][$id])).CACHE_SERIAL_FOOTER; 336 336 $fd = @fopen($temp_file, 'w'); 337 337 if ( false === $fd ) {
Note: See TracChangeset
for help on using the changeset viewer.