Skip to content

Commit 223abba

Browse files
authored
Fix missing error report on installation when file system not writable.
1 parent eeacf64 commit 223abba

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

maintain.class.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,10 @@ function install($plugin_version, &$errors=array())
157157
include_once( PHPWG_ROOT_PATH. 'plugins/piwigo-openstreetmap/osmmap3.php');
158158
?>
159159
EOF;
160-
file_put_contents(PHPWG_ROOT_PATH.'osmmap.php', $c);
160+
if (!file_put_contents(PHPWG_ROOT_PATH.'osmmap.php', $c)) {
161+
error_reporting($_error_reporting);
162+
throw new SmartyException("unable to write file {$PHPWG_ROOT_PATH.'osmmap.php'}");
163+
}
161164
}
162165
}
163166

0 commit comments

Comments
 (0)