Skip to content

Commit

Permalink
Allow reading 0-byte files
Browse files Browse the repository at this point in the history
  • Loading branch information
drbyte committed Sep 8, 2020
1 parent ac3be24 commit e1f7ce0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions admin/define_pages_editor.php
Expand Up @@ -3,7 +3,7 @@
* @copyright Copyright 2003-2020 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @version $Id: DrByte 2020 Jun 16 Modified in v1.5.7 $
* @version $Id: DrByte 2020 Sept 8 Modified in v1.5.7a $
*/
require('includes/application_top.php');

Expand Down Expand Up @@ -171,8 +171,8 @@ function init() {
?>
<?php
if ($_SESSION['language'] && $_GET['filename']) {
if (file_exists($file) && $file_array = @file($file)) {
$file_contents = implode('', $file_array);
if (file_exists($file)) {
$file_contents = file_get_contents($file);

$file_writeable = true;
if (!is_writeable($file)) {
Expand Down

0 comments on commit e1f7ce0

Please sign in to comment.