Commit bd18379d authored by Chris Graham's avatar Chris Graham
Browse files

Fixed MANTIS-4641 (Issue when running on non-suEXEC environments)

parent b327c256
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -534,8 +534,12 @@ function erase_persistent_cache()
    erase_static_cache();

    require_code('files');
    if (is_writable_wrap(get_custom_file_base() . '/data_custom/failover_rewritemap.txt')) {
        cms_file_put_contents_safe(get_custom_file_base() . '/data_custom/failover_rewritemap.txt', '', FILE_WRITE_FAILURE_SOFT | FILE_WRITE_FIX_PERMISSIONS);
    }
    if (is_writable_wrap(get_custom_file_base() . '/data_custom/failover_rewritemap__mobile.txt')) {
        cms_file_put_contents_safe(get_custom_file_base() . '/data_custom/failover_rewritemap__mobile.txt', '', FILE_WRITE_FAILURE_SOFT | FILE_WRITE_FIX_PERMISSIONS);
    }

    global $PERSISTENT_CACHE;
    if ($PERSISTENT_CACHE === null) {
+1 −1
Original line number Diff line number Diff line
@@ -182,7 +182,7 @@ function _cms_file_put_contents_safe_failed($error_message, $path, $flags = 4)

    if (($flags & FILE_WRITE_FAILURE_SOFT) != 0) {
        global $IN_MINIKERNEL_VERSION;
        if (!$IN_MINIKERNEL_VERSION) {
        if ((!$IN_MINIKERNEL_VERSION) && (function_exists('user_lang'))) {
            require_code('site');
            attach_message($error_message, 'warn');
        }