Skip to content

Commit 4b70df5

Browse files
authored
Merge pull request #233 from GeVa2072/bugfix/missing_error_message_on_not_writable_filesystem
Fix missing error report on installation when file system not writable.
2 parents eeacf64 + 223abba commit 4b70df5

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)