• Dear Support,
    I have following messages in error log:
    robime.it [Wed Nov 03 19:16:42.364303 2021] [php7:warn] [pid 412] [client 172.70.34.214:45424] PHP Warning: Use of undefined constant FS_CHMOD_FILE – assumed ‘FS_CHMOD_FILE’ (this will throw an Error in a future version of PHP) in /data/c/b/cb70c92a-4223-4bdc-bdff-9445dc18a7ad/XXXXX/web/wp-admin/includes/class-wp-filesystem-direct.php on line 164

    robime.it [Wed Nov 03 19:16:42.364328 2021] [php7:warn] [pid 412] [client 172.70.34.214:45424] PHP Warning: chmod() expects parameter 2 to be int, string given in /data/c/b/cb70c92a-4223-4bdc-bdff-9445dc18a7ad/XXXX/web/wp-admin/includes/class-wp-filesystem-direct.php on line 173

    How can I fix this warnings?

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Do you have the full trace on those warnings ( warning are not fatal by the way )

    Something ( probably a plugin ) is calling a wp filesystem function in the wrong way. What exactly the trace would give a clue.

    Probably best to set in debug mode and get the log entries. https://www.ads-software.com/support/article/debugging-in-wordpress/

    Thread Starter sbaa

    (@sbaa)

    Thanks for reply.
    debug.log display the same warning messages without any additional information

    You could try adding this above debug in wp-config.php to log the backtrace for warnings to help you find what originated the call

    set_error_handler(function() {
        error_log(print_r(debug_backtrace(), true));
        return true;
    }, E_USER_WARNING);
    
    define( 'WP_DEBUG', true );
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', false );
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Use of undefined constant FS_CHMOD_FILE’ is closed to new replies.