WordPress.org

Make WordPress Core

Ticket #1999: templates.php.diff

File templates.php.diff, 424 bytes (added by technosailor, 16 years ago)

adds a conditional to check for empty filesize

  • templates.php

     
    7070       
    7171        if (!$error) {
    7272                $f = fopen($real_file, 'r');
    73                 $content = fread($f, filesize($real_file));
     73                if(filesize($real_file) > 0)
     74                {
     75                $content = fread($f, filesize($real_file));
    7476                $content = htmlspecialchars($content);
     77                }
    7578        }
    7679
    7780        ?>