Changeset 3170

Show
Ignore:
Timestamp:
11/19/05 20:12:26 (3 years ago)
Author:
ryan
Message:

Suppress fopen warnings and check return.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-includes/cache.php

    r3138 r3170  
    303303                $temp_file = tempnam($group_dir, 'tmp'); 
    304304                $serial = CACHE_SERIAL_HEADER.serialize($this->cache[$group][$id]).CACHE_SERIAL_FOOTER; 
    305                 $fd = fopen($temp_file, 'w'); 
     305                $fd = @fopen($temp_file, 'w'); 
     306                if ( false === $fd ) 
     307                    continue; 
    306308                fputs($fd, $serial); 
    307309                fclose($fd);